From 5dd76a04408423de875415740fba88e784e5d5fb Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 22 Jun 2019 01:15:23 +0800 Subject: [PATCH 01/54] dts: pangu: Add PanGu board from i2SOM The PanGu board use STM32MP157 SoC, and support more functions. Such as HDMI, ethernet, USB host, USB OTG, LCD, MIPI, Camera etc.. --- arch/arm/boot/dts/Makefile | 5 +- .../boot/dts/stm32mp157a-panguboard-lcd.dts | 56 ++ .../boot/dts/stm32mp157a-panguboard-mipi.dts | 91 +++ arch/arm/boot/dts/stm32mp157a-panguboard.dts | 769 ++++++++++++++++++ arch/arm/configs/i2som_panguboard_defconfig | 497 +++++++++++ 5 files changed, 1417 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard.dts create mode 100644 arch/arm/configs/i2som_panguboard_defconfig diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5665290923661a..e6f0ee59e70e1e 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -929,7 +929,10 @@ dtb-$(CONFIG_ARCH_STM32) += \ stm32mp157c-ed1.dtb \ stm32mp157c-ev1.dtb \ stm32mp157c-ev1-a7-examples.dtb \ - stm32mp157c-ev1-m4-examples.dtb + stm32mp157c-ev1-m4-examples.dtb \ + stm32mp157a-panguboard.dtb \ + stm32mp157a-panguboard-mipi.dtb \ + stm32mp157a-panguboard-lcd.dtb dtb-$(CONFIG_MACH_SUN4I) += \ sun4i-a10-a1000.dtb \ sun4i-a10-ba10-tvbox.dtb \ diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts new file mode 100644 index 00000000000000..bba8e4abc3b2e4 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-panguboard.dts" + +/ { + model = "i2SOM PanGu Board LCD"; + compatible = "i2som,pangu", "st,stm32mp157"; + + panel_rgb: panel-rgb { + compatible = "innolux,at070tn92"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <<dc_pins_b>; + pinctrl-1 = <<dc_pins_sleep_b>; + backlight = <&panel_backlight>; + status = "okay"; + + port { + panel_in_rgb: endpoint { + remote-endpoint = <<dc_out_rgb>; + }; + }; + }; + +}; + +&i2c2 { + ft5x06: ft5x06@38 { + compatible = "edt,edt-ft5306"; + reg = <0x38>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpiog>; + interrupt-controller; + reset-gpios = <&gpiog 7 GPIO_ACTIVE_LOW>; + status = "okay"; + }; +}; + +<dc { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + ltdc_out_rgb: endpoint { + remote-endpoint = <&panel_in_rgb>; + }; + + }; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts new file mode 100644 index 00000000000000..aa520aa4fb8cb3 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-panguboard.dts" +#include + +/ { + model = "i2SOM PanGu Board MIPI"; + compatible = "i2som,pangu", "st,stm32mp157"; +}; + +&dsi { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + remote-endpoint = <<dc_ep1_out>; + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + + panel@0 { + compatible = "orisetech,otm8009a"; + reg = <0>; + reset-gpios = <&gpioc 7 GPIO_ACTIVE_LOW>; + status = "okay"; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; +}; + +&i2c2 { + touchscreen@2a { + compatible = "focaltech,ft6236"; + reg = <0x2a>; + interrupts = <13 2>; + interrupt-parent = <&gpioc>; + interrupt-controller; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + status = "okay"; + }; + + touchscreen@38 { + compatible = "focaltech,ft6336"; + reg = <0x38>; + interrupts = <13 2>; + interrupt-parent = <&gpioc>; + interrupt-controller; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + status = "okay"; + }; +}; + +<dc { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + ltdc_ep1_out: endpoint@1 { + reg = <1>; + remote-endpoint = <&dsi_in>; + }; + }; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard.dts b/arch/arm/boot/dts/stm32mp157a-panguboard.dts new file mode 100644 index 00000000000000..ba4c9e78cca75d --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard.dts @@ -0,0 +1,769 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) STMicroelectronics 2018 - All Rights Reserved + * Author: Alexandre Torgue . + */ + +/dts-v1/; + +#include "stm32mp157c.dtsi" +#include "stm32mp157c-m4-srm.dtsi" +#include "stm32mp157caa-pinctrl.dtsi" +#include +#include + +/ { + model = "i2SOM PanGu Board"; + compatible = "i2som,pangu", "st,stm32mp157"; + + aliases { + ethernet0 = ðernet0; + serial0 = &uart4; + serial1 = &uart5; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@c0000000 { + reg = <0xc0000000 0x20000000>; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + retram: retram@0x38000000 { + compatible = "shared-dma-pool"; + reg = <0x38000000 0x10000>; + no-map; + }; + + mcuram: mcuram@0x30000000 { + compatible = "shared-dma-pool"; + reg = <0x30000000 0x40000>; + no-map; + }; + + mcuram2: mcuram2@0x10000000 { + compatible = "shared-dma-pool"; + reg = <0x10000000 0x40000>; + no-map; + }; + + vdev0vring0: vdev0vring0@10040000 { + compatible = "shared-dma-pool"; + reg = <0x10040000 0x2000>; + no-map; + }; + + vdev0vring1: vdev0vring1@10042000 { + compatible = "shared-dma-pool"; + reg = <0x10042000 0x2000>; + no-map; + }; + + vdev0buffer: vdev0buffer@10044000 { + compatible = "shared-dma-pool"; + reg = <0x10044000 0x4000>; + no-map; + }; + + gpu_reserved: gpu@dc000000 { + reg = <0xdc000000 0x4000000>; + no-map; + }; + }; + + sram: sram@10050000 { + compatible = "mmio-sram"; + reg = <0x10050000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x10050000 0x10000>; + + dma_pool: dma_pool@0 { + reg = <0x0 0x10000>; + pool; + }; + }; + + clocks { + clk_ext_camera: clk-ext-camera { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + }; + }; + + leds { + compatible = "gpio-leds"; + cpu { + label = "cpu"; + gpios = <&gpioi 11 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + default-state = "on"; + }; + + user1 { + label = "user1"; + gpios = <&gpioh 6 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + }; + + keys { + compatible = "gpio-keys"; + + user { + label = "user"; + gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>; + gpio-key,wakeup; + linux,code = ; + }; + }; + + sound { + compatible = "audio-graph-card"; + label = "STM32MP1-DK"; + routing = + "Playback" , "MCLK", + "Capture" , "MCLK", + "MICL" , "Mic Bias"; + dais = <&sai2a_port &sai2b_port &i2s2_port>; + status = "okay"; + }; + + usb_phy_tuning: usb-phy-tuning { + st,hs-dc-level = <2>; + st,fs-rftime-tuning; + st,hs-rftime-reduction; + st,hs-current-trim = <15>; + st,hs-impedance-trim = <1>; + st,squelch-level = <3>; + st,hs-rx-offset = <2>; + st,no-lsfs-sc; + }; + + v3v3: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "v3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + v1v8_audio: regulator-v1v8-audio { + compatible = "regulator-fixed"; + regulator-name = "v1v8_audio"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + + v3v3_hdmi: regulator-v3v3-hdmi { + compatible = "regulator-fixed"; + regulator-name = "v3v3_hdmi"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + v1v2_hdmi: regulator-v1v2-hdmi { + compatible = "regulator-fixed"; + regulator-name = "v1v2_hdmi"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd: regulator-vdd { + compatible = "regulator-fixed"; + regulator-name = "vdd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_usb: regulator-vdd-usb { + compatible = "regulator-fixed"; + regulator-name = "vdd_usb"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + v2v8: v2v8 { + compatible = "regulator-fixed"; + regulator-name = "v2v8"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-boot-on; + }; + + vbus_otg: regulator-vbus-otg { + compatible = "regulator-fixed"; + regulator-name = "vbus_otg"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + }; + + + + panel_backlight: panel-backlight { + compatible = "pwm-backlight"; + pwms = <&pwm2 0 5000000>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + status = "okay"; + }; + +/* + panel_rgb: panel-rgb { + compatible = "innolux,at070tn92"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <<dc_pins_b>; + pinctrl-1 = <<dc_pins_sleep_b>; + backlight = <&panel_backlight>; + status = "disabled"; + + port { + panel_in_rgb: endpoint { + remote-endpoint = <<dc_out_rgb>; + }; + }; + }; +*/ +}; + +&pinctrl { + pwm2_pins_b: pwm2-0 { + pins { + pinmux = ; /* TIM2_CH1 */ + bias-pull-down; + drive-push-pull; + slew-rate = <0>; + }; + }; + + pwm2_sleep_pins_b: pwm2-sleep-0 { + pins { + pinmux = ; /* TIM2_CH1 */ + }; + }; + + i2s2_pins_b: i2s2-2 { + pins { + pinmux = , /* I2S2_SDO */ + , /* I2S2_WS */ + ; /* I2S2_CK */ + slew-rate = <1>; + drive-push-pull; + bias-disable; + }; + }; + + i2s2_pins_sleep_b: i2s2-3 { + pins { + pinmux = , /* I2S2_SDO */ + , /* I2S2_WS */ + ; /* I2S2_CK */ + }; + }; + + uart5_pins_a: uart5-0 { + pins1 { + pinmux = ; /* UART5_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* UART5_RX */ + bias-disable; + }; + }; + + uart5_idle_pins_a: uart5-idle-0 { + pins1 { + pinmux = ; /* UART5_TX */ + }; + pins2 { + pinmux = ; /* UART5_RX */ + bias-disable; + }; + }; + + uart5_sleep_pins_a: uart5-sleep-0 { + pins { + pinmux = , /* UART5_TX */ + ; /* UART5_RX */ + }; + }; + +}; + +&cec { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cec_pins_a>; + pinctrl-1 = <&cec_pins_sleep_a>; + status = "okay"; +}; + +&dma1 { + sram = <&dma_pool>; +}; + +&dma2 { + sram = <&dma_pool>; +}; + +&dts { + status = "okay"; +}; + +ðernet0 { + pinctrl-0 = <ðernet0_rgmii_pins_a>; + pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>; + pinctrl-names = "default", "sleep"; + phy-mode = "rgmii"; + max-speed = <1000>; + phy-handle = <&phy0>; + status = "okay"; + + mdio0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; +}; + +&gpu { + contiguous-area = <&gpu_reserved>; + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c2_pins_a>; + pinctrl-1 = <&i2c2_pins_sleep_a>; + /*i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>;*/ + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + + ft5x06: ft5x06@38 { + compatible = "edt,edt-ft5306"; + reg = <0x38>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpiog>; + interrupt-controller; + reset-gpios = <&gpiog 7 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + + tsc2007: tsc2007@48 { + compatible = "ti,tsc2007"; + reg = <0x48>; + interrupt-parent = <&gpioi>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + interrupt-controller; + gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; + ti,x-plate-ohms = <660>; + wakeup-source; + }; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + clocks = <&clk_ext_camera>; + clock-names = "xclk"; + DOVDD-supply = <&v2v8>; + powerdown-gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpioa 4 GPIO_ACTIVE_LOW>; + rotation = <180>; + status = "okay"; + + port { + ov5640_0: endpoint { + remote-endpoint = <&dcmi_0>; + bus-width = <8>; + data-shift = <2>; /* lines 9:2 are used */ + hsync-active = <0>; + vsync-active = <0>; + pclk-sample = <1>; + pclk-max-frequency = <77000000>; + }; + }; + }; + +}; + +&i2c5 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c5_pins_a>; + pinctrl-1 = <&i2c5_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + + cs42l51: cs42l51@4a { + compatible = "cirrus,cs42l51"; + reg = <0x4a>; + #sound-dai-cells = <0>; + status = "okay"; + + VL-supply = <&v3v3>; + VD-supply = <&v1v8_audio>; + VA-supply = <&v1v8_audio>; + VAHP-supply = <&v1v8_audio>; + + reset-gpios = <&gpioc 0 GPIO_ACTIVE_LOW>; + + clocks = <&sai2a>; + clock-names = "MCLK"; + + cs42l51_port: port { + #address-cells = <1>; + #size-cells = <0>; + + cs42l51_tx_endpoint: endpoint@0 { + reg = <0>; + remote-endpoint = <&sai2a_endpoint>; + frame-master; + bitclock-master; + }; + + cs42l51_rx_endpoint: endpoint@1 { + reg = <1>; + remote-endpoint = <&sai2b_endpoint>; + frame-master; + bitclock-master; + }; + }; + }; + + hdmi-transmitter@39 { + compatible = "sil,sii9022"; + reg = <0x39>; + iovcc-supply = <&v3v3_hdmi>; + cvcc12-supply = <&v1v2_hdmi>; + reset-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; + interrupts = <14 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpioa>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <<dc_pins_b>; + pinctrl-1 = <<dc_pins_sleep_b>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + sii9022_in: endpoint { + remote-endpoint = <<dc_ep0_out>; + }; + }; + + port@1 { + reg = <1>; + sii9022_tx_endpoint: endpoint { + remote-endpoint = <&i2s2_endpoint>; + }; + }; + }; + }; + +}; + +&i2s2 { + clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>; + clock-names = "pclk", "i2sclk", "x8k", "x11k"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2s2_pins_b>; + pinctrl-1 = <&i2s2_pins_sleep_b>; + status = "okay"; + + i2s2_port: port { + i2s2_endpoint: endpoint { + remote-endpoint = <&sii9022_tx_endpoint>; + format = "i2s"; + mclk-fs = <256>; + }; + }; +}; + +&ipcc { + status = "okay"; +}; + +&iwdg2 { + timeout-sec = <32>; + status = "okay"; +}; + +<dc { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + ltdc_ep0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&sii9022_in>; + }; + }; +}; + +&m4_rproc { + memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>, + <&vdev0vring1>, <&vdev0buffer>; + mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>; + mbox-names = "vq0", "vq1", "shutdown"; + interrupt-parent = <&exti>; + interrupts = <68 1>; + interrupt-names = "wdg"; + recovery; + status = "okay"; +}; + +&pwr { + pwr-supply = <&vdd>; +}; + +&rng1 { + status = "okay"; +}; + +&rtc { + status = "okay"; +}; + +&sai2 { + clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>; + clock-names = "pclk", "x8k", "x11k"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>; + pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>; + status = "okay"; + + sai2a: audio-controller@4400b004 { + #clock-cells = <0>; + dma-names = "tx"; + clocks = <&rcc SAI2_K>; + clock-names = "sai_ck"; + status = "okay"; + + sai2a_port: port { + sai2a_endpoint: endpoint { + remote-endpoint = <&cs42l51_tx_endpoint>; + format = "i2s"; + mclk-fs = <256>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + }; + }; + }; + + sai2b: audio-controller@4400b024 { + dma-names = "rx"; + st,sync = <&sai2a 2>; + status = "okay"; + clocks = <&rcc SAI2_K>, <&sai2a>; + clock-names = "sai_ck", "MCLK"; + + sai2b_port: port { + sai2b_endpoint: endpoint { + remote-endpoint = <&cs42l51_rx_endpoint>; + format = "i2s"; + mclk-fs = <256>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + }; + }; + }; +}; + +&sdmmc1 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc1_b4_pins_a>; + pinctrl-1 = <&sdmmc1_b4_od_pins_a>; + pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; + broken-cd; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + status = "okay"; +}; + +/* emmc */ +&sdmmc2 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_b &sdmmc2_d47_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_b>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <8>; + vmmc-supply = <&v3v3>; + keep-power-in-suspend; + status = "okay"; +}; + +&spi4 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi4_pins_a>; + pinctrl-1 = <&spi4_sleep_pins_a>; + status = "disabled"; +}; + +&spi5 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi5_pins_a>; + pinctrl-1 = <&spi5_sleep_pins_a>; + status = "disabled"; +}; + +&timers2 { + status = "okay"; + /* spare dmas for other usage */ + /delete-property/dmas; + /delete-property/dma-names; + pwm2: pwm { + pinctrl-0 = <&pwm2_pins_b>; + pinctrl-1 = <&pwm2_sleep_pins_b>; + pinctrl-names = "default", "sleep"; + #pwm-cells = <2>; + status = "okay"; + }; + timer@1 { + status = "disabled"; + }; +}; + +&uart4 { + pinctrl-names = "default", "sleep", "idle", "no_console_suspend"; + pinctrl-0 = <&uart4_pins_a>; + pinctrl-1 = <&uart4_sleep_pins_a>; + pinctrl-2 = <&uart4_idle_pins_a>; + pinctrl-3 = <&uart4_pins_a>; + status = "okay"; +}; + +&uart5 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&uart5_pins_a>; + pinctrl-1 = <&uart5_sleep_pins_a>; + pinctrl-2 = <&uart5_idle_pins_a>; + status = "okay"; +}; + +&m_can1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&m_can1_pins_a>; + pinctrl-1 = <&m_can1_sleep_pins_a>; + status = "okay"; +}; + +&qspi { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>; + pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>; + reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + flash0: mx66l51235l@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-rx-bus-width = <4>; + spi-max-frequency = <108000000>; + #address-cells = <1>; + #size-cells = <1>; + }; + + flash1: mx66l51235l@1 { + compatible = "jedec,spi-nor"; + reg = <1>; + spi-rx-bus-width = <4>; + spi-max-frequency = <108000000>; + #address-cells = <1>; + #size-cells = <1>; + }; +}; + +&dcmi { + status = "okay"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&dcmi_pins_a>; + pinctrl-1 = <&dcmi_sleep_pins_a>; + + port { + dcmi_0: endpoint { + remote-endpoint = <&ov5640_0>; + bus-width = <8>; + hsync-active = <0>; + vsync-active = <0>; + pclk-sample = <1>; + pclk-max-frequency = <77000000>; + }; + }; +}; + +&usbh_ehci { + phys = <&usbphyc_port0>; + phy-names = "usb"; + status = "okay"; +}; + +&usbotg_hs { + pinctrl-names = "default"; + pinctrl-0 = <&usbotg_hs_pins_a>; + dr_mode = "otg"; + phys = <&usbphyc_port1 0>; + phy-names = "usb2-phy"; + vbus-supply = <&vbus_otg>; + status = "okay"; +}; + +&usbphyc { + vdd3v3-supply = <&vdd_usb>; + status = "okay"; +}; + +&usbphyc_port0 { + st,phy-tuning = <&usb_phy_tuning>; +}; + +&usbphyc_port1 { + st,phy-tuning = <&usb_phy_tuning>; +}; + +&vrefbuf { + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + vdda-supply = <&vdd>; + status = "okay"; +}; diff --git a/arch/arm/configs/i2som_panguboard_defconfig b/arch/arm/configs/i2som_panguboard_defconfig new file mode 100644 index 00000000000000..4990dce8e15085 --- /dev/null +++ b/arch/arm/configs/i2som_panguboard_defconfig @@ -0,0 +1,497 @@ +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_USELIB=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_CGROUPS=y +CONFIG_MEMCG=y +CONFIG_BLK_CGROUP=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_NAMESPACES=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_EMBEDDED=y +CONFIG_PROFILING=y +CONFIG_ARCH_STM32=y +CONFIG_ARM_THUMBEE=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_ERRATA_430973=y +CONFIG_ARM_ERRATA_720789=y +CONFIG_ARM_ERRATA_754322=y +CONFIG_ARM_ERRATA_754327=y +CONFIG_ARM_ERRATA_764369=y +CONFIG_ARM_ERRATA_775420=y +CONFIG_ARM_ERRATA_798181=y +CONFIG_SMP=y +CONFIG_MCPM=y +CONFIG_HIGHMEM=y +CONFIG_FORCE_MAX_ZONEORDER=12 +CONFIG_SECCOMP=y +# CONFIG_ATAGS is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_ARM_CRYPTO=y +CONFIG_CRYPTO_SHA1_ARM_NEON=m +CONFIG_CRYPTO_SHA1_ARM_CE=m +CONFIG_CRYPTO_SHA2_ARM_CE=m +CONFIG_CRYPTO_SHA512_ARM=m +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRYPTO_AES_ARM_BS=m +CONFIG_CRYPTO_AES_ARM_CE=m +CONFIG_CRYPTO_GHASH_ARM_CE=m +CONFIG_CRYPTO_CRC32_ARM_CE=m +CONFIG_CRYPTO_CHACHA20_NEON=m +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_CMDLINE_PARTITION=y +CONFIG_CMA=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_MIP6=m +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_NET_DSA=m +CONFIG_CAN=y +CONFIG_CAN_FLEXCAN=m +CONFIG_CAN_M_CAN=y +CONFIG_BT=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_CFG80211=m +CONFIG_MAC80211=m +CONFIG_RFKILL=y +CONFIG_RFKILL_INPUT=y +CONFIG_RFKILL_GPIO=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 +CONFIG_BRCMSTB_GISB_ARB=y +CONFIG_SIMPLE_PM_BUS=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_STM32_FMC2=y +CONFIG_MTD_SPI_NOR=y +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set +CONFIG_MTD_UBI=y +CONFIG_OF_OVERLAY=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 +CONFIG_VIRTIO_BLK=y +CONFIG_AD525X_DPOT=y +CONFIG_AD525X_DPOT_I2C=y +CONFIG_ICS932S401=y +CONFIG_SRAM=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=m +CONFIG_EEPROM_93CX6=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_SG=y +CONFIG_ATA=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_NETDEVICES=y +CONFIG_TUN=m +CONFIG_VIRTIO_NET=y +# CONFIG_NET_VENDOR_ALACRITECH is not set +# CONFIG_NET_VENDOR_AMAZON is not set +# CONFIG_NET_VENDOR_AQUANTIA is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_AURORA is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CADENCE is not set +# CONFIG_NET_VENDOR_CAVIUM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_CORTINA is not set +# CONFIG_NET_VENDOR_EZCHIP is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_HISILICON is not set +# CONFIG_NET_VENDOR_HUAWEI is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_MICROSEMI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NETRONOME is not set +# CONFIG_NET_VENDOR_NI is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_RENESAS is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SOLARFLARE is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_SOCIONEXT is not set +CONFIG_STMMAC_ETH=y +CONFIG_DWMAC_DWC_QOS_ETH=y +# CONFIG_NET_VENDOR_SYNOPSYS is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_MDIO_BCM_UNIMAC=m +CONFIG_MDIO_BITBANG=y +CONFIG_AT803X_PHY=m +CONFIG_BCM7XXX_PHY=m +CONFIG_BROADCOM_PHY=y +CONFIG_MARVELL_PHY=m +CONFIG_MICREL_PHY=m +CONFIG_SMSC_PHY=m +CONFIG_USB_PEGASUS=y +CONFIG_USB_RTL8152=m +CONFIG_USB_LAN78XX=m +CONFIG_USB_USBNET=y +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_SMSC75XX=y +CONFIG_USB_NET_SMSC95XX=y +# CONFIG_WLAN_VENDOR_ADMTEK is not set +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_USB=y +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_RT2X00=m +CONFIG_RT2800USB=m +CONFIG_RTL8192CU=m +CONFIG_INPUT_FF_MEMLESS=m +CONFIG_INPUT_MATRIXKMAP=y +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_MATRIX=m +CONFIG_MOUSE_PS2_ELANTECH=y +CONFIG_MOUSE_CYAPA=m +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_STMPE=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_ADXL34X=m +CONFIG_INPUT_STPMIC1_ONKEY=y +CONFIG_SERIO_AMBAKMI=y +CONFIG_SERIAL_NONSTANDARD=y +CONFIG_SERIAL_STM32=y +CONFIG_SERIAL_STM32_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_HW_RANDOM=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_ARB_GPIO_CHALLENGE=m +CONFIG_I2C_MUX_PINCTRL=y +CONFIG_I2C_DEMUX_PINCTRL=y +CONFIG_I2C_STM32F7=y +CONFIG_SPI=y +CONFIG_SPI_BITBANG=y +CONFIG_SPI_CADENCE=y +CONFIG_SPI_GPIO=m +CONFIG_SPI_STM32=y +CONFIG_SPI_STM32_QSPI=y +CONFIG_SPI_SPIDEV=y +CONFIG_SPMI=y +CONFIG_PINCTRL_SINGLE=y +CONFIG_PINCTRL_STMFX=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_SYSCON=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_BRCMKONA=y +CONFIG_POWER_RESET_BRCMSTB=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_SENSORS_IIO_HWMON=y +CONFIG_SENSORS_LM90=y +CONFIG_SENSORS_LM95245=y +CONFIG_SENSORS_NTC_THERMISTOR=m +CONFIG_SENSORS_PWM_FAN=m +CONFIG_SENSORS_INA2XX=m +CONFIG_THERMAL=y +CONFIG_ST_THERMAL_MEMMAP=y +CONFIG_WATCHDOG=y +CONFIG_ARM_SP805_WATCHDOG=y +CONFIG_DW_WATCHDOG=y +CONFIG_STPMIC1_WATCHDOG=y +CONFIG_BCMA=y +CONFIG_BCMA_HOST_SOC=y +CONFIG_BCMA_DRIVER_GMAC_CMN=y +CONFIG_BCMA_DRIVER_GPIO=y +CONFIG_MFD_STMPE=y +CONFIG_MFD_WM8994=y +CONFIG_MFD_STM32_LPTIMER=y +CONFIG_MFD_STPMIC1=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_VIRTUAL_CONSUMER=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_PWM=y +CONFIG_REGULATOR_STM32_VREFBUF=y +CONFIG_REGULATOR_STM32_PWR=y +CONFIG_REGULATOR_STPMIC1=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_CEC_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_STM32_DCMI=m +CONFIG_SOC_CAMERA=m +CONFIG_SOC_CAMERA_PLATFORM=m +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_V4L_TEST_DRIVERS=y +CONFIG_VIDEO_VIVID=m +CONFIG_CEC_PLATFORM_DRIVERS=y +CONFIG_VIDEO_STM32_HDMI_CEC=m +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_VIDEO_ADV7180=m +CONFIG_VIDEO_ML86V7667=m +CONFIG_VIDEO_ADV7511=m +CONFIG_VIDEO_OV5640=m +CONFIG_DRM=y +# CONFIG_DRM_FBDEV_EMULATION is not set +CONFIG_DRM_STM=y +CONFIG_DRM_STM_DSI=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_SAMSUNG_LD9040=m +CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m +CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03=m +CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=m +CONFIG_DRM_DUMB_VGA_DAC=m +CONFIG_DRM_NXP_PTN3460=m +CONFIG_DRM_PARADE_PS8622=m +CONFIG_DRM_SII902X=y +CONFIG_DRM_SII9234=m +CONFIG_DRM_I2C_ADV7511=m +CONFIG_DRM_I2C_ADV7511_AUDIO=y +CONFIG_DRM_STI=m +CONFIG_FB_ARMCLCD=y +CONFIG_FB_SIMPLE=y +CONFIG_LCD_PLATFORM=m +CONFIG_BACKLIGHT_PWM=y +CONFIG_BACKLIGHT_GPIO=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_SOC_STM32_SAI=y +CONFIG_SND_SOC_STM32_I2S=y +CONFIG_SND_SOC_STM32_SPDIFRX=y +CONFIG_SND_SOC_STM32_DFSDM=y +CONFIG_SND_SOC_CS42L42=y +CONFIG_SND_SOC_CS42L51_I2C=y +CONFIG_SND_SOC_SGTL5000=m +CONFIG_SND_SOC_STI_SAS=m +CONFIG_SND_SOC_TLV320AIC23_I2C=m +CONFIG_SND_SOC_TS3A227E=m +CONFIG_SND_SOC_WM8753=m +CONFIG_SND_SOC_WM8903=m +CONFIG_SND_SOC_WM8978=m +CONFIG_SND_SOC_WM8994=y +CONFIG_SND_SIMPLE_CARD=m +CONFIG_SND_SIMPLE_SCU_CARD=m +CONFIG_SND_AUDIO_GRAPH_CARD=y +CONFIG_USB=y +CONFIG_USB_OTG=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_R8A66597_HCD=m +CONFIG_USB_STORAGE=y +CONFIG_USB_UAS=m +CONFIG_USB_DWC2=m +CONFIG_USB_GPIO_VBUS=m +CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=m +CONFIG_U_SERIAL_CONSOLE=y +CONFIG_USB_SNP_UDC_PLAT=m +CONFIG_USB_BDC_UDC=m +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_EEM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_F_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC1_LEGACY=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ETH=m +CONFIG_USB_G_NCM=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_TYPEC=y +CONFIG_TYPEC_STUSB=y +CONFIG_USB_ULPI_BUS=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK_MINORS=16 +CONFIG_MMC_ARMMMCI=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_OF_ARASAN=y +CONFIG_MMC_SDHCI_OF_AT91=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_CLASS_FLASH=m +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=y +CONFIG_LEDS_TRIGGER_CAMERA=y +CONFIG_EDAC=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_HYM8563=m +CONFIG_RTC_DRV_RS5C372=m +CONFIG_RTC_DRV_BQ32K=m +CONFIG_RTC_DRV_S35390A=m +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_STM32=y +CONFIG_DMADEVICES=y +CONFIG_FSL_EDMA=y +CONFIG_PL330_DMA=y +CONFIG_STM32_DMA=y +CONFIG_STM32_DMAMUX=y +CONFIG_STM32_MDMA=y +CONFIG_DW_DMAC=y +CONFIG_VIRTIO_MMIO=y +CONFIG_CHROME_PLATFORMS=y +CONFIG_HWSPINLOCK=y +CONFIG_HWSPINLOCK_STM32=y +CONFIG_ARM_TIMER_SP804=y +CONFIG_PL320_MBOX=y +CONFIG_STM32_IPCC=y +CONFIG_REMOTEPROC=y +CONFIG_STM32_RPROC=y +CONFIG_RPMSG_VIRTIO=y +CONFIG_RPMSG_TTY=y +CONFIG_IIO=y +CONFIG_IIO_SW_TRIGGER=y +CONFIG_SD_ADC_MODULATOR=y +CONFIG_STM32_ADC_CORE=y +CONFIG_STM32_ADC=y +CONFIG_STM32_ADC_TEMP=y +CONFIG_STM32_DFSDM_ADC=y +CONFIG_STM32_LPTIMER_CNT=y +CONFIG_STM32_DAC=y +CONFIG_MPU3050_I2C=y +CONFIG_CM36651=m +CONFIG_SENSORS_ISL29018=y +CONFIG_SENSORS_ISL29028=y +CONFIG_AK8975=y +CONFIG_IIO_HRTIMER_TRIGGER=y +CONFIG_IIO_STM32_LPTIMER_TRIGGER=y +CONFIG_PWM=y +CONFIG_PWM_STM32=y +CONFIG_PWM_STM32_LP=y +CONFIG_PHY_STM32_USBPHYC=y +CONFIG_RAS=y +CONFIG_NVMEM_STM32_ROMEM=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_AUTOFS4_FS=y +CONFIG_OVERLAY_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_NTFS_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +CONFIG_PSTORE=y +CONFIG_PSTORE_CONSOLE=y +CONFIG_PSTORE_PMSG=y +CONFIG_PSTORE_RAM=y +CONFIG_SYSV_FS=m +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_ROOT_NFS=y +CONFIG_NFSD=y +CONFIG_NFSD_V4=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_UTF8=y +CONFIG_CRYPTO_USER=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_USER_API_RNG=m +CONFIG_CRYPTO_USER_API_AEAD=m +CONFIG_CRYPTO_DEV_STM32_CRC=y +CONFIG_CRYPTO_DEV_STM32_HASH=y +CONFIG_CRYPTO_DEV_STM32_CRYP=y +CONFIG_PRINTK_TIME=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_DEBUG_INFO=y +CONFIG_GDB_SCRIPTS=y +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_DEBUG_SECTION_MISMATCH=y +# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_RCU_TRACE=y +CONFIG_SAMPLES=y +CONFIG_SAMPLE_RPMSG_CLIENT=m From 170d1551764d5416f80946b650fc68372497b1af Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sun, 23 Jun 2019 14:23:45 +0800 Subject: [PATCH 02/54] dts: pangu: PanGu board only one QSPI flash removed the unused flash section --- arch/arm/boot/dts/stm32mp157a-panguboard.dts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard.dts b/arch/arm/boot/dts/stm32mp157a-panguboard.dts index ba4c9e78cca75d..99da41e0521538 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard.dts @@ -695,7 +695,7 @@ #size-cells = <0>; status = "okay"; - flash0: mx66l51235l@0 { + flash0: mx25l25635f@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-rx-bus-width = <4>; @@ -703,15 +703,6 @@ #address-cells = <1>; #size-cells = <1>; }; - - flash1: mx66l51235l@1 { - compatible = "jedec,spi-nor"; - reg = <1>; - spi-rx-bus-width = <4>; - spi-max-frequency = <108000000>; - #address-cells = <1>; - #size-cells = <1>; - }; }; &dcmi { From ff1fafeb00b093e92df469e4d94f7d51399b0b5c Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 28 Jun 2019 16:59:07 +0800 Subject: [PATCH 03/54] dts: pangu: move camera to i2c5 Move camera(ov5640) into i2c5 section. Fix the clock pinmux of i2s2. --- arch/arm/boot/dts/stm32mp157a-panguboard.dts | 49 ++++++++++---------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard.dts b/arch/arm/boot/dts/stm32mp157a-panguboard.dts index 99da41e0521538..84c8263ea11326 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard.dts @@ -279,7 +279,7 @@ pins { pinmux = , /* I2S2_SDO */ , /* I2S2_WS */ - ; /* I2S2_CK */ + ; /* I2S2_CK */ }; }; @@ -389,30 +389,6 @@ wakeup-source; }; - ov5640: camera@3c { - compatible = "ovti,ov5640"; - reg = <0x3c>; - clocks = <&clk_ext_camera>; - clock-names = "xclk"; - DOVDD-supply = <&v2v8>; - powerdown-gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpioa 4 GPIO_ACTIVE_LOW>; - rotation = <180>; - status = "okay"; - - port { - ov5640_0: endpoint { - remote-endpoint = <&dcmi_0>; - bus-width = <8>; - data-shift = <2>; /* lines 9:2 are used */ - hsync-active = <0>; - vsync-active = <0>; - pclk-sample = <1>; - pclk-max-frequency = <77000000>; - }; - }; - }; - }; &i2c5 { @@ -494,6 +470,29 @@ }; }; + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + clocks = <&clk_ext_camera>; + clock-names = "xclk"; + DOVDD-supply = <&v2v8>; + powerdown-gpios = <&gpioa 4 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>; + rotation = <180>; + status = "okay"; + + port { + ov5640_0: endpoint { + remote-endpoint = <&dcmi_0>; + bus-width = <8>; + data-shift = <2>; /* lines 9:2 are used */ + hsync-active = <0>; + vsync-active = <0>; + pclk-sample = <1>; + pclk-max-frequency = <77000000>; + }; + }; + }; }; &i2s2 { From d2d13039bf5fc95d3c92355707a1c701085649e6 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Thu, 11 Jul 2019 22:03:04 +0800 Subject: [PATCH 04/54] dts: panguboard: disable HDMI when LCD using 1. disable HDMI when LCD is using 2. fix the IRQ line of ft5316 chip conflict with same number, so switch the IRQ and reset line 3. The DCMI using 8bit data line --- .../boot/dts/stm32mp157a-panguboard-lcd.dts | 7 ++- .../boot/dts/stm32mp157a-panguboard-mipi.dts | 4 +- arch/arm/boot/dts/stm32mp157a-panguboard.dts | 63 ++++++++++++------- 3 files changed, 48 insertions(+), 26 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts index bba8e4abc3b2e4..2a3da72118ba44 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts @@ -41,6 +41,10 @@ }; }; +&hdmi { + status = "disabled"; +}; + <dc { status = "okay"; @@ -48,7 +52,8 @@ #address-cells = <1>; #size-cells = <0>; - ltdc_out_rgb: endpoint { + ltdc_out_rgb: endpoint@1 { + reg = <1>; remote-endpoint = <&panel_in_rgb>; }; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts index aa520aa4fb8cb3..0d814851c4feea 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts @@ -83,8 +83,8 @@ #address-cells = <1>; #size-cells = <0>; - ltdc_ep1_out: endpoint@1 { - reg = <1>; + ltdc_ep1_out: endpoint@2 { + reg = <2>; remote-endpoint = <&dsi_in>; }; }; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard.dts b/arch/arm/boot/dts/stm32mp157a-panguboard.dts index 84c8263ea11326..c043550aa9c0ef 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard.dts @@ -14,7 +14,7 @@ / { model = "i2SOM PanGu Board"; - compatible = "i2som,pangu", "st,stm32mp157"; + compatible = "i2som,panguboard", "st,stm32mp157"; aliases { ethernet0 = ðernet0; @@ -229,23 +229,6 @@ default-brightness-level = <6>; status = "okay"; }; - -/* - panel_rgb: panel-rgb { - compatible = "innolux,at070tn92"; - pinctrl-names = "default", "sleep"; - pinctrl-0 = <<dc_pins_b>; - pinctrl-1 = <<dc_pins_sleep_b>; - backlight = <&panel_backlight>; - status = "disabled"; - - port { - panel_in_rgb: endpoint { - remote-endpoint = <<dc_out_rgb>; - }; - }; - }; -*/ }; &pinctrl { @@ -313,6 +296,39 @@ }; }; + dcmi_pins_b: dcmi-1 { + pins { + pinmux = ,/* DCMI_HSYNC */ + ,/* DCMI_VSYNC */ + ,/* DCMI_PIXCLK */ + ,/* DCMI_D0 */ + ,/* DCMI_D1 */ + ,/* DCMI_D2 */ + ,/* DCMI_D3 */ + ,/* DCMI_D4 */ + ,/* DCMI_D5 */ + ,/* DCMI_D6 */ + ;/* DCMI_D7 */ + bias-disable; + }; + }; + + dcmi_sleep_pins_b: dcmi-sleep-1 { + pins { + pinmux = ,/* DCMI_HSYNC */ + ,/* DCMI_VSYNC */ + ,/* DCMI_PIXCLK */ + ,/* DCMI_D0 */ + ,/* DCMI_D1 */ + ,/* DCMI_D2 */ + ,/* DCMI_D3 */ + ,/* DCMI_D4 */ + ,/* DCMI_D5 */ + ,/* DCMI_D6 */ + ;/* DCMI_D7 */ + }; + }; + }; &cec { @@ -371,10 +387,10 @@ ft5x06: ft5x06@38 { compatible = "edt,edt-ft5306"; reg = <0x38>; - interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + interrupts = <7 IRQ_TYPE_EDGE_FALLING>; interrupt-parent = <&gpiog>; interrupt-controller; - reset-gpios = <&gpiog 7 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpiog 8 GPIO_ACTIVE_LOW>; status = "okay"; }; @@ -437,7 +453,7 @@ }; }; - hdmi-transmitter@39 { + hdmi: hdmi-transmitter@39 { compatible = "sil,sii9022"; reg = <0x39>; iovcc-supply = <&v3v3_hdmi>; @@ -510,6 +526,7 @@ mclk-fs = <256>; }; }; + }; &ipcc { @@ -707,8 +724,8 @@ &dcmi { status = "okay"; pinctrl-names = "default", "sleep"; - pinctrl-0 = <&dcmi_pins_a>; - pinctrl-1 = <&dcmi_sleep_pins_a>; + pinctrl-0 = <&dcmi_pins_b>; + pinctrl-1 = <&dcmi_sleep_pins_b>; port { dcmi_0: endpoint { From fa4d3746073afddef33abb929c1d84c0fb5f81ce Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 13 Jul 2019 13:55:30 +0800 Subject: [PATCH 05/54] dts: panguboard: move ft5x06 section to lcd file --- arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts | 4 ++-- arch/arm/boot/dts/stm32mp157a-panguboard.dts | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts index 2a3da72118ba44..995b553b2ed0f0 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts @@ -33,10 +33,10 @@ ft5x06: ft5x06@38 { compatible = "edt,edt-ft5306"; reg = <0x38>; - interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + interrupts = <7 IRQ_TYPE_EDGE_FALLING>; interrupt-parent = <&gpiog>; interrupt-controller; - reset-gpios = <&gpiog 7 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpiog 8 GPIO_ACTIVE_LOW>; status = "okay"; }; }; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard.dts b/arch/arm/boot/dts/stm32mp157a-panguboard.dts index c043550aa9c0ef..377a84f1a4b527 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard.dts @@ -384,16 +384,6 @@ /delete-property/dmas; /delete-property/dma-names; - ft5x06: ft5x06@38 { - compatible = "edt,edt-ft5306"; - reg = <0x38>; - interrupts = <7 IRQ_TYPE_EDGE_FALLING>; - interrupt-parent = <&gpiog>; - interrupt-controller; - reset-gpios = <&gpiog 8 GPIO_ACTIVE_LOW>; - status = "okay"; - }; - tsc2007: tsc2007@48 { compatible = "ti,tsc2007"; reg = <0x48>; From b2679417720d30d9b8f4740600be852bd87099f6 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 13 Jul 2019 13:55:56 +0800 Subject: [PATCH 06/54] config: panguboard: enable TSC2007 touch chip --- arch/arm/configs/i2som_panguboard_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/i2som_panguboard_defconfig b/arch/arm/configs/i2som_panguboard_defconfig index 4990dce8e15085..986bece0baa5c6 100644 --- a/arch/arm/configs/i2som_panguboard_defconfig +++ b/arch/arm/configs/i2som_panguboard_defconfig @@ -198,6 +198,7 @@ CONFIG_MOUSE_CYAPA=m CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_GOODIX=m CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_TSC2007=m CONFIG_TOUCHSCREEN_STMPE=m CONFIG_INPUT_MISC=y CONFIG_INPUT_ADXL34X=m From 59ba0fce4f864b8c88df08d2e3a5d715982a63e5 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 22 Jul 2019 15:50:35 +0800 Subject: [PATCH 07/54] dts: panguboard: disable the TSC2007 touch chip --- arch/arm/boot/dts/stm32mp157a-panguboard.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard.dts b/arch/arm/boot/dts/stm32mp157a-panguboard.dts index 377a84f1a4b527..652dcf59b7cf95 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard.dts @@ -378,12 +378,13 @@ pinctrl-names = "default", "sleep"; pinctrl-0 = <&i2c2_pins_a>; pinctrl-1 = <&i2c2_pins_sleep_a>; - /*i2c-scl-rising-time-ns = <100>; - i2c-scl-falling-time-ns = <7>;*/ + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; status = "okay"; /delete-property/dmas; /delete-property/dma-names; +/* tsc2007: tsc2007@48 { compatible = "ti,tsc2007"; reg = <0x48>; @@ -392,9 +393,8 @@ interrupt-controller; gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; ti,x-plate-ohms = <660>; - wakeup-source; }; - +*/ }; &i2c5 { From b11249b48d35611597f64111be52356a0d64ff4f Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 23 Aug 2019 01:00:05 +0800 Subject: [PATCH 08/54] dts: panguboard: add support more LCD and touch panel support LCDs size are 4.3inch and 7inch. support touch IC is GT9147. --- .../boot/dts/stm32mp157a-panguboard-lcd.dts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts index 995b553b2ed0f0..c50ec5972c6c90 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd.dts @@ -14,6 +14,8 @@ panel_rgb: panel-rgb { compatible = "innolux,at070tn92"; + //compatible = "innolux,zj070na-01p"; + //compatible = "innolux,at043tn24"; pinctrl-names = "default", "sleep"; pinctrl-0 = <<dc_pins_b>; pinctrl-1 = <<dc_pins_sleep_b>; @@ -39,6 +41,26 @@ reset-gpios = <&gpiog 8 GPIO_ACTIVE_LOW>; status = "okay"; }; + + gt9147@5d { + compatible = "goodix,gt9147"; + reg = <0x5d>; + pinctrl-names = "default"; + pinctrl-0 = <>9147_irq>; + irq-gpios = <&gpiog 7 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpiog 8 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; +}; + +&pinctrl { + gt9147_irq:gt9147_irq { + pins { + pinmux = ; /* PG7.GPIO */ + bias-pull-down; + drive-push-pull; + }; + }; }; &hdmi { From 82388b5b50776b3a9cc7f2a90910657ea5d308c6 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 23 Aug 2019 01:02:06 +0800 Subject: [PATCH 09/54] pinctrl: stm32: remove the strict flag The stm32mp1 can not configre a pin with pinctrl and gpio framework at same time. We need disable it to configure the irq pin of gt9147 use pull-down setting. --- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index 25d268a52066be..1bedf4a3914f52 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -776,7 +776,7 @@ static const struct pinmux_ops stm32_pmx_ops = { .get_function_groups = stm32_pmx_get_func_groups, .set_mux = stm32_pmx_set_mux, .gpio_set_direction = stm32_pmx_gpio_set_direction, - .strict = true, + //.strict = true, }; /* Pinconf functions */ From 5419316d1908278c45c9120f12e7372f6b767bec Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 27 Sep 2019 13:00:18 +0800 Subject: [PATCH 10/54] driver:usb support Quectel EC20 LTE module The host use QMI method to communicate with LTE module. --- drivers/net/usb/qmi_wwan.c | 38 +++++++++++++++++++++++++++++++++++ drivers/usb/serial/option.c | 1 + drivers/usb/serial/usb_wwan.c | 9 +++++++++ 3 files changed, 48 insertions(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 9195f3476b1d79..cb723134bde0f1 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -448,6 +448,25 @@ static const u8 default_modem_addr[ETH_ALEN] = {0x02, 0x50, 0xf3}; static const u8 buggy_fw_addr[ETH_ALEN] = {0x00, 0xa0, 0xc6, 0x00, 0x00, 0x00}; +struct sk_buff *qmi_wwan_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) +{ + if (dev->udev->descriptor.idVendor != cpu_to_le16(0x2C7C)) + return skb; + // Skip Ethernet header from message + + if (skb_pull(skb, ETH_HLEN)) { + return skb; + } else { + dev_err(&dev->intf->dev, "Packet Dropped "); + } + + // Filter the packet out, release it + + dev_kfree_skb_any(skb); + + return NULL; +} + /* Make up an ethernet header if the packet doesn't have one. * * A firmware bug common among several devices cause them to send raw @@ -474,6 +493,9 @@ static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb) bool rawip = info->flags & QMI_WWAN_FLAG_RAWIP; __be16 proto; + if (dev->udev->descriptor.idVendor != cpu_to_le16(0x2C7C)) + return 1; + /* This check is no longer done by usbnet */ if (skb->len < dev->net->hard_header_len) return 0; @@ -742,6 +764,21 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf) } dev->net->netdev_ops = &qmi_wwan_netdev_ops; dev->net->sysfs_groups[0] = &qmi_wwan_sysfs_attr_group; + + if (dev->udev->descriptor.idVendor == cpu_to_le16(0x2C7C)) { + dev_err(&intf->dev, + "Quectel EC25&EC21&EC20 R2.0&EG91&EG95&EG06&EP06&EM06&BG96 work on RawIP mode\n"); + dev->net->flags |= IFF_NOARP; + + usb_control_msg( + interface_to_usbdev(intf), + usb_sndctrlpipe(interface_to_usbdev(intf), 0), + 0x22, //USB_CDC_REQ_SET_CONTROL_LINE_STATE + 0x21, //USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE + 1, //active CDC DTR + intf->cur_altsetting->desc.bInterfaceNumber, + NULL, 0, 100); + } err: return status; } @@ -842,6 +879,7 @@ static const struct driver_info qmi_wwan_info_quirk_dtr = { .unbind = qmi_wwan_unbind, .manage_power = qmi_wwan_manage_power, .rx_fixup = qmi_wwan_rx_fixup, + .tx_fixup = qmi_wwan_tx_fixup, .data = QMI_WWAN_QUIRK_DTR, }; diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index d8c474b386a811..cff8593a27e42e 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -2002,6 +2002,7 @@ static struct usb_serial_driver option_1port_device = { #ifdef CONFIG_PM .suspend = usb_wwan_suspend, .resume = usb_wwan_resume, + .reset_resume = usb_wwan_resume, #endif }; diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 912472f26e4f6c..3ff244fafefbd2 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c @@ -500,6 +500,15 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port, usb_sndbulkpipe(serial->dev, endpoint) | dir, buf, len, callback, ctx); + /* for Quectel EC20 4G module */ + if (dir == USB_DIR_OUT) { + struct usb_device_descriptor *desc = &serial->dev->descriptor; + + if (desc->idVendor == 0x05C6 && (desc->idProduct == 0x9003 || + desc->idProduct == 0x9090 || + desc->idProduct == 0x9215)) + urb->transfer_flags |= URB_ZERO_PACKET; + } return urb; } From 9f4a734870ad69d0b768cba336fa77b48e2b30c3 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 27 Sep 2019 17:50:42 +0800 Subject: [PATCH 11/54] config:panguboard: enable 4G LTE module config --- arch/arm/configs/i2som_panguboard_defconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/configs/i2som_panguboard_defconfig b/arch/arm/configs/i2som_panguboard_defconfig index 986bece0baa5c6..038c1181eee11d 100644 --- a/arch/arm/configs/i2som_panguboard_defconfig +++ b/arch/arm/configs/i2som_panguboard_defconfig @@ -179,6 +179,7 @@ CONFIG_USB_USBNET=y CONFIG_USB_NET_CDC_MBIM=m CONFIG_USB_NET_SMSC75XX=y CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_QMI_WWAN=m # CONFIG_WLAN_VENDOR_ADMTEK is not set CONFIG_BRCMFMAC=m CONFIG_BRCMFMAC_USB=y @@ -339,9 +340,13 @@ CONFIG_USB_EHCI_HCD_PLATFORM=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PLATFORM=y CONFIG_USB_R8A66597_HCD=m +CONFIG_USB_ACM=m CONFIG_USB_STORAGE=y CONFIG_USB_UAS=m CONFIG_USB_DWC2=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_OPTION=m CONFIG_USB_GPIO_VBUS=m CONFIG_USB_ULPI=y CONFIG_USB_GADGET=m From ef13b6fb251d52984793d3aba4c9d19f822047c4 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 27 Sep 2019 18:07:00 +0800 Subject: [PATCH 12/54] arm:dts: support LCD modules i2M-LCD043P800C i2M-LCD070P1024C --- arch/arm/boot/dts/Makefile | 3 ++- .../boot/dts/stm32mp157a-panguboard-lcd043p800c.dts | 13 +++++++++++++ .../dts/stm32mp157a-panguboard-lcd070p1024c.dts | 13 +++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e6f0ee59e70e1e..ce0c36f415b6d0 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -932,7 +932,8 @@ dtb-$(CONFIG_ARCH_STM32) += \ stm32mp157c-ev1-m4-examples.dtb \ stm32mp157a-panguboard.dtb \ stm32mp157a-panguboard-mipi.dtb \ - stm32mp157a-panguboard-lcd.dtb + stm32mp157a-panguboard-lcd043p800c.dtb \ + stm32mp157a-panguboard-lcd070p1024c.dtb dtb-$(CONFIG_MACH_SUN4I) += \ sun4i-a10-a1000.dtb \ sun4i-a10-ba10-tvbox.dtb \ diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c.dts new file mode 100644 index 00000000000000..e7dc78c5688dc6 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-panguboard-lcd.dts" + +&panel_rgb { + compatible = "innolux,at070tn92"; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c.dts new file mode 100644 index 00000000000000..e5b1392cc144c2 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-panguboard-lcd.dts" + +&panel_rgb { + compatible = "innolux,zj070na-01p"; +}; From 440c9a84b9ddc703a00021addf216eadefc3bfda Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 11 Nov 2019 02:02:05 +0800 Subject: [PATCH 13/54] arm:dts: fix panguboard mipi use wrong node id --- arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts index 0d814851c4feea..aa520aa4fb8cb3 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi.dts @@ -83,8 +83,8 @@ #address-cells = <1>; #size-cells = <0>; - ltdc_ep1_out: endpoint@2 { - reg = <2>; + ltdc_ep1_out: endpoint@1 { + reg = <1>; remote-endpoint = <&dsi_in>; }; }; From cc9cf59dd7dd43cf8179e33f71568655ca7048ed Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 11 Nov 2019 02:04:07 +0800 Subject: [PATCH 14/54] arm:dts: add i2C-MP15X-B nand and emmc variant NAND variant stm32mp157a-i2cmp15xbn.dts eMMC variant stm32mp157a-i2cmp15xbe.dts --- arch/arm/boot/dts/Makefile | 4 +- .../stm32mp157a-i2cmp15xbe-lcd043p800c.dts | 13 + arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 568 +++++++++++++++++ .../stm32mp157a-i2cmp15xbn-lcd043p800c.dts | 13 + arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts | 602 ++++++++++++++++++ 5 files changed, 1199 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd043p800c.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index ce0c36f415b6d0..d923448fea6e08 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -933,7 +933,9 @@ dtb-$(CONFIG_ARCH_STM32) += \ stm32mp157a-panguboard.dtb \ stm32mp157a-panguboard-mipi.dtb \ stm32mp157a-panguboard-lcd043p800c.dtb \ - stm32mp157a-panguboard-lcd070p1024c.dtb + stm32mp157a-panguboard-lcd070p1024c.dtb \ + stm32mp157a-i2cmp15xbn-lcd043p800c.dtb \ + stm32mp157a-i2cmp15xbe-lcd043p800c.dtb dtb-$(CONFIG_MACH_SUN4I) += \ sun4i-a10-a1000.dtb \ sun4i-a10-ba10-tvbox.dtb \ diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts new file mode 100644 index 00000000000000..4472ab1c1ce62f --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-i2cmp15xbe.dts" + +&panel_rgb { + compatible = "innolux,at070tn92"; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts new file mode 100644 index 00000000000000..2f44b76effaa74 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -0,0 +1,568 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157c.dtsi" +#include "stm32mp157c-m4-srm.dtsi" +#include "stm32mp157caa-pinctrl.dtsi" +#include +#include + +/ { + model = "i2SOM i2C-MP15X-C Board"; + compatible = "i2som,i2cmp15xb", "st,stm32mp157"; + + aliases { + ethernet0 = ðernet0; + serial0 = &uart4; + serial1 = &uart5; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@c0000000 { + reg = <0xc0000000 0x20000000>; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + retram: retram@0x38000000 { + compatible = "shared-dma-pool"; + reg = <0x38000000 0x10000>; + no-map; + }; + + mcuram: mcuram@0x30000000 { + compatible = "shared-dma-pool"; + reg = <0x30000000 0x40000>; + no-map; + }; + + mcuram2: mcuram2@0x10000000 { + compatible = "shared-dma-pool"; + reg = <0x10000000 0x40000>; + no-map; + }; + + vdev0vring0: vdev0vring0@10040000 { + compatible = "shared-dma-pool"; + reg = <0x10040000 0x2000>; + no-map; + }; + + vdev0vring1: vdev0vring1@10042000 { + compatible = "shared-dma-pool"; + reg = <0x10042000 0x2000>; + no-map; + }; + + vdev0buffer: vdev0buffer@10044000 { + compatible = "shared-dma-pool"; + reg = <0x10044000 0x4000>; + no-map; + }; + + gpu_reserved: gpu@dc000000 { + reg = <0xdc000000 0x4000000>; + no-map; + }; + }; + + sram: sram@10050000 { + compatible = "mmio-sram"; + reg = <0x10050000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x10050000 0x10000>; + + dma_pool: dma_pool@0 { + reg = <0x0 0x10000>; + pool; + }; + }; + + clocks { + clk_ext_camera: clk-ext-camera { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + }; + }; + + leds { + compatible = "gpio-leds"; + + cpu { + label = "cpu"; + gpios = <&gpioh 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + default-state = "on"; + }; + }; + + usb_phy_tuning: usb-phy-tuning { + st,hs-dc-level = <2>; + st,fs-rftime-tuning; + st,hs-rftime-reduction; + st,hs-current-trim = <15>; + st,hs-impedance-trim = <1>; + st,squelch-level = <3>; + st,hs-rx-offset = <2>; + st,no-lsfs-sc; + }; + + v3v3: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "v3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd: regulator-vdd { + compatible = "regulator-fixed"; + regulator-name = "vdd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_usb: regulator-vdd-usb { + compatible = "regulator-fixed"; + regulator-name = "vdd_usb"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + v2v8: v2v8 { + compatible = "regulator-fixed"; + regulator-name = "v2v8"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-boot-on; + }; + + vbus_otg: regulator-vbus-otg { + compatible = "regulator-fixed"; + regulator-name = "vbus_otg"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + }; + + panel_backlight: panel-backlight { + compatible = "pwm-backlight"; + pwms = <&pwm2 0 500000>; + brightness-levels = <0 4 8 14 18 24 28 34 38 44 48 54 58 64 68 74 78 84 88 96 112 128 144 160 176 192 194 196 200 255>; + default-brightness-level = <6>; + status = "okay"; + }; + + panel_rgb: panel-rgb { + //compatible = "innolux,at070tn92"; + compatible = "innolux,zj070na-01p"; + //compatible = "innolux,at043tn24"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <<dc_pins_b>; + pinctrl-1 = <<dc_pins_sleep_b>; + backlight = <&panel_backlight>; + status = "okay"; + + port { + panel_in_rgb: endpoint { + remote-endpoint = <<dc_out_rgb>; + }; + }; + }; + + +}; + +&pinctrl { + pwm2_pins_b: pwm2-0 { + pins { + pinmux = ; /* TIM2_CH1 */ + bias-pull-down; + drive-push-pull; + slew-rate = <0>; + }; + }; + + pwm2_sleep_pins_b: pwm2-sleep-0 { + pins { + pinmux = ; /* TIM2_CH1 */ + }; + }; + + i2s2_pins_b: i2s2-2 { + pins { + pinmux = , /* I2S2_SDO */ + , /* I2S2_WS */ + ; /* I2S2_CK */ + slew-rate = <1>; + drive-push-pull; + bias-disable; + }; + }; + + i2s2_pins_sleep_b: i2s2-3 { + pins { + pinmux = , /* I2S2_SDO */ + , /* I2S2_WS */ + ; /* I2S2_CK */ + }; + }; + + uart5_pins_a: uart5-0 { + pins1 { + pinmux = ; /* UART5_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* UART5_RX */ + bias-disable; + }; + }; + + uart5_idle_pins_a: uart5-idle-0 { + pins1 { + pinmux = ; /* UART5_TX */ + }; + pins2 { + pinmux = ; /* UART5_RX */ + bias-disable; + }; + }; + + uart5_sleep_pins_a: uart5-sleep-0 { + pins { + pinmux = , /* UART5_TX */ + ; /* UART5_RX */ + }; + }; + + gt9147_irq:gt9147_irq { + pins { + pinmux = ; /* PG7.GPIO */ + bias-pull-down; + drive-push-pull; + }; + }; + +}; + +&cec { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cec_pins_a>; + pinctrl-1 = <&cec_pins_sleep_a>; + status = "disabled"; +}; + +&dma1 { + sram = <&dma_pool>; +}; + +&dma2 { + sram = <&dma_pool>; +}; + +&dts { + status = "okay"; +}; + +ðernet0 { + pinctrl-0 = <ðernet0_rgmii_pins_a>; + pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>; + pinctrl-names = "default", "sleep"; + phy-mode = "rgmii"; + max-speed = <1000>; + phy-handle = <&phy0>; + status = "okay"; + + mdio0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; +}; + +&gpu { + contiguous-area = <&gpu_reserved>; + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c2_pins_a>; + pinctrl-1 = <&i2c2_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + +/* + tsc2007: tsc2007@48 { + compatible = "ti,tsc2007"; + reg = <0x48>; + interrupt-parent = <&gpioi>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + interrupt-controller; + gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; + ti,x-plate-ohms = <660>; + }; +*/ + ft5x06: ft5x06@38 { + compatible = "edt,edt-ft5306"; + reg = <0x38>; + interrupts = <7 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpiog>; + interrupt-controller; + reset-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + + gt9147@5d { + compatible = "goodix,gt9147"; + reg = <0x5d>; + pinctrl-names = "default"; + pinctrl-0 = <>9147_irq>; + irq-gpios = <&gpiog 7 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + +}; + +&i2c5 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c5_pins_a>; + pinctrl-1 = <&i2c5_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + +}; + +&i2s2 { + clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>; + clock-names = "pclk", "i2sclk", "x8k", "x11k"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2s2_pins_b>; + pinctrl-1 = <&i2s2_pins_sleep_b>; + status = "disabled"; +}; + +&ipcc { + status = "okay"; +}; + +&iwdg2 { + timeout-sec = <32>; + status = "okay"; +}; + +<dc { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + ltdc_out_rgb: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_in_rgb>; + }; + }; +}; + +&m4_rproc { + memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>, + <&vdev0vring1>, <&vdev0buffer>; + mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>; + mbox-names = "vq0", "vq1", "shutdown"; + interrupt-parent = <&exti>; + interrupts = <68 1>; + interrupt-names = "wdg"; + recovery; + status = "okay"; +}; + +&pwr { + pwr-supply = <&vdd>; +}; + +&rng1 { + status = "okay"; +}; + +&rtc { + status = "okay"; +}; + +&sai2 { + clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>; + clock-names = "pclk", "x8k", "x11k"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>; + pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>; + status = "disabled"; +}; + +&sdmmc1 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc1_b4_pins_a>; + pinctrl-1 = <&sdmmc1_b4_od_pins_a>; + pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; + broken-cd; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + status = "okay"; +}; + +/* emmc */ +&sdmmc2 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_b &sdmmc2_d47_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_b>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <8>; + vmmc-supply = <&v3v3>; + keep-power-in-suspend; + status = "okay"; +}; + +&spi4 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi4_pins_a>; + pinctrl-1 = <&spi4_sleep_pins_a>; + status = "disabled"; +}; + +&spi5 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi5_pins_a>; + pinctrl-1 = <&spi5_sleep_pins_a>; + status = "disabled"; +}; + +&timers2 { + status = "okay"; + /* spare dmas for other usage */ + /delete-property/dmas; + /delete-property/dma-names; + pwm2: pwm { + pinctrl-0 = <&pwm2_pins_b>; + pinctrl-1 = <&pwm2_sleep_pins_b>; + pinctrl-names = "default", "sleep"; + #pwm-cells = <2>; + status = "okay"; + }; + timer@1 { + status = "disabled"; + }; +}; + +&uart4 { + pinctrl-names = "default", "sleep", "idle", "no_console_suspend"; + pinctrl-0 = <&uart4_pins_a>; + pinctrl-1 = <&uart4_sleep_pins_a>; + pinctrl-2 = <&uart4_idle_pins_a>; + pinctrl-3 = <&uart4_pins_a>; + status = "okay"; +}; + +&uart5 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&uart5_pins_a>; + pinctrl-1 = <&uart5_sleep_pins_a>; + pinctrl-2 = <&uart5_idle_pins_a>; + status = "okay"; +}; + +&m_can1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&m_can1_pins_a>; + pinctrl-1 = <&m_can1_sleep_pins_a>; + status = "okay"; +}; + +&qspi { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>; + pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>; + reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + flash0: mx25l25635f@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-rx-bus-width = <4>; + spi-max-frequency = <108000000>; + #address-cells = <1>; + #size-cells = <1>; + }; +}; + +&usbh_ehci { + phys = <&usbphyc_port0>; + phy-names = "usb"; + status = "okay"; +}; + +&usbotg_hs { + pinctrl-names = "default"; + pinctrl-0 = <&usbotg_hs_pins_a>; + dr_mode = "otg"; + phys = <&usbphyc_port1 0>; + phy-names = "usb2-phy"; + vbus-supply = <&vbus_otg>; + status = "okay"; +}; + +&usbphyc { + vdd3v3-supply = <&vdd_usb>; + status = "okay"; +}; + +&usbphyc_port0 { + st,phy-tuning = <&usb_phy_tuning>; +}; + +&usbphyc_port1 { + st,phy-tuning = <&usb_phy_tuning>; +}; + +&vrefbuf { + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + vdda-supply = <&vdd>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd043p800c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd043p800c.dts new file mode 100644 index 00000000000000..9457624fb51ea0 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd043p800c.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-i2cmp15xbn.dts" + +&panel_rgb { + compatible = "innolux,at070tn92"; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts new file mode 100644 index 00000000000000..cfcbb72641cd5f --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts @@ -0,0 +1,602 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157c.dtsi" +#include "stm32mp157c-m4-srm.dtsi" +#include "stm32mp157caa-pinctrl.dtsi" +#include +#include + +/ { + model = "i2SOM i2C-MP15X-C Board"; + compatible = "i2som,i2cmp15xb", "st,stm32mp157"; + + aliases { + ethernet0 = ðernet0; + serial0 = &uart4; + serial1 = &uart5; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@c0000000 { + reg = <0xc0000000 0x20000000>; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + retram: retram@0x38000000 { + compatible = "shared-dma-pool"; + reg = <0x38000000 0x10000>; + no-map; + }; + + mcuram: mcuram@0x30000000 { + compatible = "shared-dma-pool"; + reg = <0x30000000 0x40000>; + no-map; + }; + + mcuram2: mcuram2@0x10000000 { + compatible = "shared-dma-pool"; + reg = <0x10000000 0x40000>; + no-map; + }; + + vdev0vring0: vdev0vring0@10040000 { + compatible = "shared-dma-pool"; + reg = <0x10040000 0x2000>; + no-map; + }; + + vdev0vring1: vdev0vring1@10042000 { + compatible = "shared-dma-pool"; + reg = <0x10042000 0x2000>; + no-map; + }; + + vdev0buffer: vdev0buffer@10044000 { + compatible = "shared-dma-pool"; + reg = <0x10044000 0x4000>; + no-map; + }; + + gpu_reserved: gpu@dc000000 { + reg = <0xdc000000 0x4000000>; + no-map; + }; + }; + + sram: sram@10050000 { + compatible = "mmio-sram"; + reg = <0x10050000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x10050000 0x10000>; + + dma_pool: dma_pool@0 { + reg = <0x0 0x10000>; + pool; + }; + }; + + clocks { + clk_ext_camera: clk-ext-camera { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + }; + }; + + leds { + compatible = "gpio-leds"; + + cpu { + label = "cpu"; + gpios = <&gpioh 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + default-state = "on"; + }; + }; + + usb_phy_tuning: usb-phy-tuning { + st,hs-dc-level = <2>; + st,fs-rftime-tuning; + st,hs-rftime-reduction; + st,hs-current-trim = <15>; + st,hs-impedance-trim = <1>; + st,squelch-level = <3>; + st,hs-rx-offset = <2>; + st,no-lsfs-sc; + }; + + v3v3: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "v3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd: regulator-vdd { + compatible = "regulator-fixed"; + regulator-name = "vdd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_usb: regulator-vdd-usb { + compatible = "regulator-fixed"; + regulator-name = "vdd_usb"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + v2v8: v2v8 { + compatible = "regulator-fixed"; + regulator-name = "v2v8"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-boot-on; + }; + + vbus_otg: regulator-vbus-otg { + compatible = "regulator-fixed"; + regulator-name = "vbus_otg"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + }; + + panel_backlight: panel-backlight { + compatible = "pwm-backlight"; + pwms = <&pwm2 0 500000>; + brightness-levels = <0 4 8 14 18 24 28 34 38 44 48 54 58 64 68 74 78 84 88 96 112 128 144 160 176 192 194 196 200 255>; + default-brightness-level = <6>; + status = "okay"; + }; + + panel_rgb: panel-rgb { + //compatible = "innolux,at070tn92"; + compatible = "innolux,zj070na-01p"; + //compatible = "innolux,at043tn24"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <<dc_pins_b>; + pinctrl-1 = <<dc_pins_sleep_b>; + backlight = <&panel_backlight>; + status = "okay"; + + port { + panel_in_rgb: endpoint { + remote-endpoint = <<dc_out_rgb>; + }; + }; + }; + + +}; + +&pinctrl { + pwm2_pins_b: pwm2-0 { + pins { + pinmux = ; /* TIM2_CH1 */ + bias-pull-down; + drive-push-pull; + slew-rate = <0>; + }; + }; + + pwm2_sleep_pins_b: pwm2-sleep-0 { + pins { + pinmux = ; /* TIM2_CH1 */ + }; + }; + + i2s2_pins_b: i2s2-2 { + pins { + pinmux = , /* I2S2_SDO */ + , /* I2S2_WS */ + ; /* I2S2_CK */ + slew-rate = <1>; + drive-push-pull; + bias-disable; + }; + }; + + i2s2_pins_sleep_b: i2s2-3 { + pins { + pinmux = , /* I2S2_SDO */ + , /* I2S2_WS */ + ; /* I2S2_CK */ + }; + }; + + uart5_pins_a: uart5-0 { + pins1 { + pinmux = ; /* UART5_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* UART5_RX */ + bias-disable; + }; + }; + + uart5_idle_pins_a: uart5-idle-0 { + pins1 { + pinmux = ; /* UART5_TX */ + }; + pins2 { + pinmux = ; /* UART5_RX */ + bias-disable; + }; + }; + + uart5_sleep_pins_a: uart5-sleep-0 { + pins { + pinmux = , /* UART5_TX */ + ; /* UART5_RX */ + }; + }; + + gt9147_irq:gt9147_irq { + pins { + pinmux = ; /* PG7.GPIO */ + bias-pull-down; + drive-push-pull; + }; + }; + +}; + +&cec { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cec_pins_a>; + pinctrl-1 = <&cec_pins_sleep_a>; + status = "disabled"; +}; + +&fmc { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&fmc_pins_a>; + pinctrl-1 = <&fmc_sleep_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + nand: nand@0 { + reg = <0>; + nand-on-flash-bbt; + #address-cells = <1>; + #size-cells = <1>; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + + partition@0 { + label = "fsbl"; + reg = <0x0 0x200000>; + }; + partition@200000 { + label = "ssbl1"; + reg = <0x200000 0x400000>; + }; + partition@40000 { + label = "ssbl2"; + reg = <0x400000 0x600000>; + }; + partition@600000 { + label = "UBI"; + reg = <0x600000 0xf800000>; + }; + }; +}; + +&dma1 { + sram = <&dma_pool>; +}; + +&dma2 { + sram = <&dma_pool>; +}; + +&dts { + status = "okay"; +}; + +ðernet0 { + pinctrl-0 = <ðernet0_rgmii_pins_a>; + pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>; + pinctrl-names = "default", "sleep"; + phy-mode = "rgmii"; + max-speed = <1000>; + phy-handle = <&phy0>; + status = "okay"; + + mdio0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; +}; + +&gpu { + contiguous-area = <&gpu_reserved>; + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c2_pins_a>; + pinctrl-1 = <&i2c2_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + +/* + tsc2007: tsc2007@48 { + compatible = "ti,tsc2007"; + reg = <0x48>; + interrupt-parent = <&gpioi>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + interrupt-controller; + gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; + ti,x-plate-ohms = <660>; + }; +*/ + ft5x06: ft5x06@38 { + compatible = "edt,edt-ft5306"; + reg = <0x38>; + interrupts = <7 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpiog>; + interrupt-controller; + reset-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + + gt9147@5d { + compatible = "goodix,gt9147"; + reg = <0x5d>; + pinctrl-names = "default"; + pinctrl-0 = <>9147_irq>; + irq-gpios = <&gpiog 7 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + +}; + +&i2c5 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c5_pins_a>; + pinctrl-1 = <&i2c5_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + +}; + +&i2s2 { + clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>; + clock-names = "pclk", "i2sclk", "x8k", "x11k"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2s2_pins_b>; + pinctrl-1 = <&i2s2_pins_sleep_b>; + status = "disabled"; +}; + +&ipcc { + status = "okay"; +}; + +&iwdg2 { + timeout-sec = <32>; + status = "okay"; +}; + +<dc { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + ltdc_out_rgb: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_in_rgb>; + }; + }; +}; + +&m4_rproc { + memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>, + <&vdev0vring1>, <&vdev0buffer>; + mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>; + mbox-names = "vq0", "vq1", "shutdown"; + interrupt-parent = <&exti>; + interrupts = <68 1>; + interrupt-names = "wdg"; + recovery; + status = "okay"; +}; + +&pwr { + pwr-supply = <&vdd>; +}; + +&rng1 { + status = "okay"; +}; + +&rtc { + status = "okay"; +}; + +&sai2 { + clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>; + clock-names = "pclk", "x8k", "x11k"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>; + pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>; + status = "disabled"; +}; + +&sdmmc1 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc1_b4_pins_a>; + pinctrl-1 = <&sdmmc1_b4_od_pins_a>; + pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; + broken-cd; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + status = "okay"; +}; + +&sdmmc2 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_b &sdmmc2_d47_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_b>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <8>; + vmmc-supply = <&v3v3>; + keep-power-in-suspend; + status = "disabled"; +}; + +&spi4 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi4_pins_a>; + pinctrl-1 = <&spi4_sleep_pins_a>; + status = "disabled"; +}; + +&spi5 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi5_pins_a>; + pinctrl-1 = <&spi5_sleep_pins_a>; + status = "disabled"; +}; + +&timers2 { + status = "okay"; + /* spare dmas for other usage */ + /delete-property/dmas; + /delete-property/dma-names; + pwm2: pwm { + pinctrl-0 = <&pwm2_pins_b>; + pinctrl-1 = <&pwm2_sleep_pins_b>; + pinctrl-names = "default", "sleep"; + #pwm-cells = <2>; + status = "okay"; + }; + timer@1 { + status = "disabled"; + }; +}; + +&uart4 { + pinctrl-names = "default", "sleep", "idle", "no_console_suspend"; + pinctrl-0 = <&uart4_pins_a>; + pinctrl-1 = <&uart4_sleep_pins_a>; + pinctrl-2 = <&uart4_idle_pins_a>; + pinctrl-3 = <&uart4_pins_a>; + status = "okay"; +}; + +&uart5 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&uart5_pins_a>; + pinctrl-1 = <&uart5_sleep_pins_a>; + pinctrl-2 = <&uart5_idle_pins_a>; + status = "okay"; +}; + +&m_can1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&m_can1_pins_a>; + pinctrl-1 = <&m_can1_sleep_pins_a>; + status = "okay"; +}; + +&qspi { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>; + pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>; + reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + flash0: mx25l25635f@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-rx-bus-width = <4>; + spi-max-frequency = <108000000>; + #address-cells = <1>; + #size-cells = <1>; + }; +}; + +&usbh_ehci { + phys = <&usbphyc_port0>; + phy-names = "usb"; + status = "okay"; +}; + +&usbotg_hs { + pinctrl-names = "default"; + pinctrl-0 = <&usbotg_hs_pins_a>; + dr_mode = "otg"; + phys = <&usbphyc_port1 0>; + phy-names = "usb2-phy"; + vbus-supply = <&vbus_otg>; + status = "okay"; +}; + +&usbphyc { + vdd3v3-supply = <&vdd_usb>; + status = "okay"; +}; + +&usbphyc_port0 { + st,phy-tuning = <&usb_phy_tuning>; +}; + +&usbphyc_port1 { + st,phy-tuning = <&usb_phy_tuning>; +}; + +&vrefbuf { + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + vdda-supply = <&vdd>; + status = "okay"; +}; From 8d52028b0d7e55b93ceb7af9c431ec3594db6e9c Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Tue, 12 Nov 2019 11:23:52 +0800 Subject: [PATCH 15/54] arm:dts:i2som: add lcd070 for i2cmp15xb board --- arch/arm/boot/dts/Makefile | 4 +++- .../dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts | 13 +++++++++++++ .../dts/stm32mp157a-i2cmp15xbn-lcd070p1024c.dts | 13 +++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd070p1024c.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index d923448fea6e08..c7d57c2b7dc867 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -935,7 +935,9 @@ dtb-$(CONFIG_ARCH_STM32) += \ stm32mp157a-panguboard-lcd043p800c.dtb \ stm32mp157a-panguboard-lcd070p1024c.dtb \ stm32mp157a-i2cmp15xbn-lcd043p800c.dtb \ - stm32mp157a-i2cmp15xbe-lcd043p800c.dtb + stm32mp157a-i2cmp15xbn-lcd070p1024c.dtb \ + stm32mp157a-i2cmp15xbe-lcd043p800c.dtb \ + stm32mp157a-i2cmp15xbe-lcd070p1024c.dtb dtb-$(CONFIG_MACH_SUN4I) += \ sun4i-a10-a1000.dtb \ sun4i-a10-ba10-tvbox.dtb \ diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts new file mode 100644 index 00000000000000..9932725970cd1a --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-i2cmp15xbn.dts" + +&panel_rgb { + compatible = "innolux,zj070na-01p"; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd070p1024c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd070p1024c.dts new file mode 100644 index 00000000000000..9932725970cd1a --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd070p1024c.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-i2cmp15xbn.dts" + +&panel_rgb { + compatible = "innolux,zj070na-01p"; +}; From 0e77c2e05e57f30829203497d4cd6726af87da13 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 15 Nov 2019 14:36:20 +0800 Subject: [PATCH 16/54] arm:configs: enable more features enable gpio watchdog enalbe load HDMI EDID firmware enable USB HID devices --- arch/arm/configs/i2som_panguboard_defconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/i2som_panguboard_defconfig b/arch/arm/configs/i2som_panguboard_defconfig index 038c1181eee11d..940ac694573805 100644 --- a/arch/arm/configs/i2som_panguboard_defconfig +++ b/arch/arm/configs/i2som_panguboard_defconfig @@ -1,3 +1,4 @@ +# CONFIG_LOCALVERSION_AUTO is not set CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_USELIB=y @@ -244,8 +245,8 @@ CONFIG_SENSORS_INA2XX=m CONFIG_THERMAL=y CONFIG_ST_THERMAL_MEMMAP=y CONFIG_WATCHDOG=y -CONFIG_ARM_SP805_WATCHDOG=y -CONFIG_DW_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_GPIO_WATCHDOG=y CONFIG_STPMIC1_WATCHDOG=y CONFIG_BCMA=y CONFIG_BCMA_HOST_SOC=y @@ -286,6 +287,7 @@ CONFIG_VIDEO_ADV7511=m CONFIG_VIDEO_OV5640=m CONFIG_DRM=y # CONFIG_DRM_FBDEV_EMULATION is not set +CONFIG_DRM_LOAD_EDID_FIRMWARE=y CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y CONFIG_DRM_PANEL_SIMPLE=y @@ -330,6 +332,8 @@ CONFIG_SND_SOC_WM8994=y CONFIG_SND_SIMPLE_CARD=m CONFIG_SND_SIMPLE_SCU_CARD=m CONFIG_SND_AUDIO_GRAPH_CARD=y +CONFIG_HIDRAW=y +CONFIG_USB_HIDDEV=y CONFIG_USB=y CONFIG_USB_OTG=y CONFIG_USB_XHCI_HCD=y From c3652d51e6c7f84ea1d868333ab958c1d9042a84 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Wed, 18 Dec 2019 20:09:17 +0800 Subject: [PATCH 17/54] arm:dts: fix wrong include dts file --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts index 9932725970cd1a..11d74749ee02f9 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts @@ -6,7 +6,7 @@ /dts-v1/; -#include "stm32mp157a-i2cmp15xbn.dts" +#include "stm32mp157a-i2cmp15xbe.dts" &panel_rgb { compatible = "innolux,zj070na-01p"; From c4a2289bb98aabdf5e09e783f34898410d39e8d1 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 17 Feb 2020 17:57:01 +0800 Subject: [PATCH 18/54] arm:config enable more function driver usb serial driver usb rndis driver --- arch/arm/configs/i2som_panguboard_defconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/configs/i2som_panguboard_defconfig b/arch/arm/configs/i2som_panguboard_defconfig index 940ac694573805..b890a60cfeaca5 100644 --- a/arch/arm/configs/i2som_panguboard_defconfig +++ b/arch/arm/configs/i2som_panguboard_defconfig @@ -180,6 +180,7 @@ CONFIG_USB_USBNET=y CONFIG_USB_NET_CDC_MBIM=m CONFIG_USB_NET_SMSC75XX=y CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_RNDIS_HOST=y CONFIG_USB_NET_QMI_WWAN=m # CONFIG_WLAN_VENDOR_ADMTEK is not set CONFIG_BRCMFMAC=m @@ -324,11 +325,6 @@ CONFIG_SND_SOC_CS42L51_I2C=y CONFIG_SND_SOC_SGTL5000=m CONFIG_SND_SOC_STI_SAS=m CONFIG_SND_SOC_TLV320AIC23_I2C=m -CONFIG_SND_SOC_TS3A227E=m -CONFIG_SND_SOC_WM8753=m -CONFIG_SND_SOC_WM8903=m -CONFIG_SND_SOC_WM8978=m -CONFIG_SND_SOC_WM8994=y CONFIG_SND_SIMPLE_CARD=m CONFIG_SND_SIMPLE_SCU_CARD=m CONFIG_SND_AUDIO_GRAPH_CARD=y @@ -349,6 +345,10 @@ CONFIG_USB_STORAGE=y CONFIG_USB_UAS=m CONFIG_USB_DWC2=m CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_SIMPLE=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_QUALCOMM=m CONFIG_USB_SERIAL_OPTION=m CONFIG_USB_GPIO_VBUS=m From a677e3e18e017a9df883e95d2ef57de263d41b95 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sun, 23 Feb 2020 12:21:31 +0800 Subject: [PATCH 19/54] usb:serial add YUGA CLM920 AC3 4G module --- drivers/usb/serial/option.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index cff8593a27e42e..e8a21940d06ed7 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -441,6 +441,7 @@ static void option_instat_callback(struct urb *urb); /* YUGA products www.yuga-info.com gavin.kx@qq.com */ #define YUGA_VENDOR_ID 0x257A +#define YUGA_VENDOR_CLM920_AC3 0x1286 #define YUGA_PRODUCT_CEM600 0x1601 #define YUGA_PRODUCT_CEM610 0x1602 #define YUGA_PRODUCT_CEM500 0x1603 @@ -494,6 +495,8 @@ static void option_instat_callback(struct urb *urb); #define YUGA_PRODUCT_CLU528 0x360D #define YUGA_PRODUCT_CLU526 0x360F +#define YUGA_PRODUCT_CLM920_AC3 0x4E3C + /* Viettel products */ #define VIETTEL_VENDOR_ID 0x2262 #define VIETTEL_PRODUCT_VT1000 0x0002 @@ -1904,6 +1907,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU581) }, { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU582) }, { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU583) }, + { USB_DEVICE(YUGA_VENDOR_CLM920_AC3, YUGA_PRODUCT_CLM920_AC3) }, { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) }, { USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */ @@ -2038,6 +2042,13 @@ static int option_probe(struct usb_serial *serial, if (device_flags & NUMEP2 && iface_desc->bNumEndpoints != 2) return -ENODEV; + if(serial->dev->descriptor.idVendor == YUGA_VENDOR_CLM920_AC3 && + serial->dev->descriptor.idProduct == YUGA_PRODUCT_CLM920_AC3) { + if(serial->interface->cur_altsetting->desc.bInterfaceNumber == 0 + || serial->interface->cur_altsetting->desc.bInterfaceNumber == 1) + return -ENODEV; + } + /* Store the device flags so we can use them during attach. */ usb_set_serial_data(serial, (void *)device_flags); From ff5fd4bd075e33f7daed7328b90350729f7a8eb5 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 11 Jan 2020 18:32:10 +0800 Subject: [PATCH 20/54] sound:codecs: wm8904 add multi endpoint support Allow to share the codec port between two CPU DAIs. The stm32mp1 has two DAIs, sai2a and sai2b. But the codec has one port. Playback: CPU-A-DAI -> CODEC-DAI/port0 Capture: CPU-A-DAI <- CODEC-DAI/port0 However, the audio graph card parses the codec nods, it expects to find DAI interface indexes matching the endpoint indexes. https://github.com/STMicroelectronics/linux/commit/449dcf9499805ffc716deb78036d5f8896db1fb5 --- sound/soc/codecs/wm8904.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 1965635ec07c70..0661188499f9f8 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -2077,6 +2077,12 @@ static int wm8904_probe(struct snd_soc_component *component) return 0; } +static int wm8904_of_xlate_dai_id(struct snd_soc_component *component, + struct device_node *endpoint) +{ + /* return dai id 0, whatever the endpoint index */ + return 0; +} static void wm8904_remove(struct snd_soc_component *component) { @@ -2090,6 +2096,7 @@ static const struct snd_soc_component_driver soc_component_dev_wm8904 = { .probe = wm8904_probe, .remove = wm8904_remove, .set_bias_level = wm8904_set_bias_level, + .of_xlate_dai_id = wm8904_of_xlate_dai_id, .use_pmdown_time = 1, .endianness = 1, .non_legacy_dai_naming = 1, From 17756196eb93f85158aa469f3687e082746a3ced Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 11 Jan 2020 18:37:27 +0800 Subject: [PATCH 21/54] sound:codecs: add depend config for wm8904 --- sound/soc/codecs/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 58161d1e5c1555..9553dd1385559f 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -1177,7 +1177,8 @@ config SND_SOC_WM8903 depends on I2C config SND_SOC_WM8904 - tristate + tristate "Wolfson Microelectronics WM8904 CODEC" + depends on I2C config SND_SOC_WM8940 tristate From a2dfcf283410be4d792ee40c4346b12c873ac447 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 11 Jan 2020 18:47:25 +0800 Subject: [PATCH 22/54] sound:generic: use sysclk for wm8904 --- sound/soc/generic/audio-graph-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 2094d2c8919f53..7782aad813c871 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -113,12 +113,12 @@ static int asoc_graph_card_hw_params(struct snd_pcm_substream *substream, if (mclk_fs) { mclk = params_rate(params) * mclk_fs; - ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk, + ret = snd_soc_dai_set_sysclk(codec_dai, 1, mclk, SND_SOC_CLOCK_IN); if (ret && ret != -ENOTSUPP) goto err; - ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk, + ret = snd_soc_dai_set_sysclk(cpu_dai, 1, mclk, SND_SOC_CLOCK_OUT); if (ret && ret != -ENOTSUPP) goto err; From 82a304196b90293667f9d7f670f4ad64706f0ba7 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Tue, 17 Mar 2020 23:46:21 +0800 Subject: [PATCH 23/54] arm:dts: configure periphery for i2C-MP15X-B board --- .../stm32mp157a-i2cmp15xbe-lcd043p800c.dts | 13 + .../stm32mp157a-i2cmp15xbe-lcd070p1024c.dts | 23 + arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 698 +++++++++++++++--- 3 files changed, 651 insertions(+), 83 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts index 4472ab1c1ce62f..762f5c66261a79 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts @@ -11,3 +11,16 @@ &panel_rgb { compatible = "innolux,at070tn92"; }; + +&i2c1 { + + gt9147@5d { + compatible = "goodix,gt9147"; + reg = <0x5d>; + pinctrl-names = "default"; + pinctrl-0 = <>9147_irq>; + irq-gpios = <&gpiog 7 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpiof 13 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts index 11d74749ee02f9..2e275a6b3a4592 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts @@ -8,6 +8,29 @@ #include "stm32mp157a-i2cmp15xbe.dts" +&pinctrl { + gt9147_irq:gt9147_irq { + pins { + pinmux = ; /* PG7.GPIO */ + bias-pull-down; + drive-push-pull; + }; + }; +}; + &panel_rgb { compatible = "innolux,zj070na-01p"; }; + +&i2c1 { + + ft5x06: ft5x06@38 { + compatible = "edt,edt-ft5306"; + reg = <0x38>; + interrupts = <7 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpiog>; + interrupt-controller; + reset-gpios = <&gpiof 13 GPIO_ACTIVE_LOW>; + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index 2f44b76effaa74..ee88ac36cf1709 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -19,7 +19,11 @@ aliases { ethernet0 = ðernet0; serial0 = &uart4; - serial1 = &uart5; + serial3 = &usart1; + serial2 = &usart3; + serial4 = &uart5; + serial5 = &usart6; + serial7 = &uart8; }; chosen { @@ -109,6 +113,17 @@ }; }; + keys { + compatible = "gpio-keys"; + + user { + label = "user"; + gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>; + gpio-key,wakeup; + linux,code = ; + }; + }; + usb_phy_tuning: usb-phy-tuning { st,hs-dc-level = <2>; st,fs-rftime-tuning; @@ -128,7 +143,7 @@ regulator-always-on; regulator-boot-on; }; - + vdd: regulator-vdd { compatible = "regulator-fixed"; regulator-name = "vdd"; @@ -165,9 +180,14 @@ regulator-boot-on; }; + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpiof 2 GPIO_ACTIVE_LOW>; + }; + panel_backlight: panel-backlight { compatible = "pwm-backlight"; - pwms = <&pwm2 0 500000>; + pwms = <&pwm2 3 500000>; brightness-levels = <0 4 8 14 18 24 28 34 38 44 48 54 58 64 68 74 78 84 88 96 112 128 144 160 176 192 194 196 200 255>; default-brightness-level = <6>; status = "okay"; @@ -178,8 +198,8 @@ compatible = "innolux,zj070na-01p"; //compatible = "innolux,at043tn24"; pinctrl-names = "default", "sleep"; - pinctrl-0 = <<dc_pins_b>; - pinctrl-1 = <<dc_pins_sleep_b>; + pinctrl-0 = <<dc_pins_c>; + pinctrl-1 = <<dc_pins_sleep_c>; backlight = <&panel_backlight>; status = "okay"; @@ -190,13 +210,31 @@ }; }; - + sound { + compatible = "audio-graph-card"; + label = "wm8904-KenQue"; + mclk-fs = <256>; + dai-format = "i2s"; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Line", "Line In Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Headphone Jack", "HPOUTL", + "Headphone Jack", "HPOUTR", + "MICBIAS", "Mic Jack", + "IN1L", "MICBIAS", + "IN2L", "Line In Jack", + "IN2R", "Line In Jack"; + dais = <&sai2a_port &sai2b_port>; + status = "okay"; + }; }; &pinctrl { pwm2_pins_b: pwm2-0 { pins { - pinmux = ; /* TIM2_CH1 */ + pinmux = ; /* TIM2_CH4 */ bias-pull-down; drive-push-pull; slew-rate = <0>; @@ -205,73 +243,411 @@ pwm2_sleep_pins_b: pwm2-sleep-0 { pins { - pinmux = ; /* TIM2_CH1 */ + pinmux = ; /* TIM2_CH4 */ + }; + }; + + uart5_pins_a: uart5-0 { + pins1 { + pinmux = ; /* UART5_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* UART5_RX */ + bias-disable; + }; + }; + + uart5_idle_pins_a: uart5-idle-0 { + pins1 { + pinmux = ; /* UART5_TX */ + }; + pins2 { + pinmux = ; /* UART5_RX */ + bias-disable; + }; + }; + + uart5_sleep_pins_a: uart5-sleep-0 { + pins { + pinmux = , /* UART5_TX */ + ; /* UART5_RX */ + }; + }; + + gt9147_irq:gt9147_irq { + pins { + pinmux = ; /* PG7.GPIO */ + bias-pull-down; + drive-push-pull; }; }; - i2s2_pins_b: i2s2-2 { + dcmi_pins_b: dcmi-1 { pins { - pinmux = , /* I2S2_SDO */ - , /* I2S2_WS */ - ; /* I2S2_CK */ + pinmux = ,/* DCMI_HSYNC */ + ,/* DCMI_VSYNC */ + ,/* DCMI_PIXCLK */ + ,/* DCMI_D0 */ + ,/* DCMI_D1 */ + ,/* DCMI_D2 */ + ,/* DCMI_D3 */ + ,/* DCMI_D4 */ + ,/* DCMI_D5 */ + ,/* DCMI_D6 */ + ;/* DCMI_D7 */ + bias-disable; + }; + }; + + dcmi_sleep_pins_b: dcmi-sleep-1 { + pins { + pinmux = ,/* DCMI_HSYNC */ + ,/* DCMI_VSYNC */ + ,/* DCMI_PIXCLK */ + ,/* DCMI_D0 */ + ,/* DCMI_D1 */ + ,/* DCMI_D2 */ + ,/* DCMI_D3 */ + ,/* DCMI_D4 */ + ,/* DCMI_D5 */ + ,/* DCMI_D6 */ + ;/* DCMI_D7 */ + }; + }; + + ltdc_pins_c: ltdc-c-0 { + pins { + pinmux = , /* LCD_CLK */ + , /* LCD_HSYNC */ + , /* LCD_VSYNC */ + , /* LCD_DE */ + , /* LCD_R0 */ + , /* LCD_R1 */ + , /* LCD_R2 */ + , /* LCD_R3 */ + , /* LCD_R4 */ + , /* LCD_R5 */ + , /* LCD_R6 */ + , /* LCD_R7 */ + , /* LCD_G0 */ + , /* LCD_G1 */ + , /* LCD_G2 */ + , /* LCD_G3 */ + , /* LCD_G4 */ + , /* LCD_G5 */ + , /* LCD_G6 */ + , /* LCD_G7 */ + , /* LCD_B0 */ + , /* LCD_B1 */ + , /* LCD_B2 */ + , /* LCD_B3 */ + , /* LCD_B4 */ + , /* LCD_B5 */ + , /* LCD_B6 */ + ; /* LCD_B7 */ + bias-disable; + drive-push-pull; slew-rate = <1>; + }; + }; + + ltdc_pins_sleep_c: ltdc-c-1 { + pins { + pinmux = , /* LCD_CLK */ + , /* LCD_HSYNC */ + , /* LCD_VSYNC */ + , /* LCD_DE */ + , /* LCD_R0 */ + , /* LCD_R1 */ + , /* LCD_R2 */ + , /* LCD_R3 */ + , /* LCD_R4 */ + , /* LCD_R5 */ + , /* LCD_R6 */ + , /* LCD_R7 */ + , /* LCD_G0 */ + , /* LCD_G1 */ + , /* LCD_G2 */ + , /* LCD_G3 */ + , /* LCD_G4 */ + , /* LCD_G5 */ + , /* LCD_G6 */ + , /* LCD_G7 */ + , /* LCD_B0 */ + , /* LCD_B1 */ + , /* LCD_B2 */ + , /* LCD_B3 */ + , /* LCD_B4 */ + , /* LCD_B5 */ + , /* LCD_B6 */ + ; /* LCD_B7 */ + }; + }; + + uart8_pins_a: uart8-0 { + pins1 { + pinmux = ; /* UART8_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* UART8_RX */ + bias-disable; + }; + }; + + uart8_idle_pins_a: uart8-idle-0 { + pins1 { + pinmux = ; /* UART8_TX */ + }; + pins2 { + pinmux = ; /* UART8_RX */ + bias-disable; + }; + }; + + uart8_sleep_pins_a: uart8-sleep-0 { + pins { + pinmux = , /* UART8_TX */ + ; /* UART8_RX */ + }; + }; + + m_can1_pins_b: m-can1-b-0 { + pins1 { + pinmux = ; /* CAN1_TX */ + slew-rate = <0>; drive-push-pull; bias-disable; }; + pins2 { + pinmux = ; /* CAN1_RX */ + bias-disable; + }; }; - i2s2_pins_sleep_b: i2s2-3 { + m_can1_sleep_pins_b: m_can1-b-sleep@0 { pins { - pinmux = , /* I2S2_SDO */ - , /* I2S2_WS */ - ; /* I2S2_CK */ + pinmux = , /* CAN1_TX */ + ; /* CAN1_RX */ }; }; - uart5_pins_a: uart5-0 { + m_can2_pins_a: m-can2-0 { pins1 { - pinmux = ; /* UART5_TX */ + pinmux = ; /* CAN2_TX */ + slew-rate = <0>; + drive-push-pull; + bias-disable; + }; + pins2 { + pinmux = ; /* CAN2_RX */ + bias-disable; + }; + }; + + m_can2_sleep_pins_a: m_can2-sleep@0 { + pins { + pinmux = , /* CAN2_TX */ + ; /* CAN2_RX */ + }; + }; + + usart3_pins_c: usart3-2 { + pins1 { + pinmux = , /* USART3_TX */ + ; /* USART3_RTS */ bias-disable; drive-push-pull; slew-rate = <0>; }; pins2 { - pinmux = ; /* UART5_RX */ + pinmux = , /* USART3_RX */ + ; /* USART3_CTS_NSS */ bias-disable; }; }; - uart5_idle_pins_a: uart5-idle-0 { + usart3_idle_pins_c: usart3-idle-2 { pins1 { - pinmux = ; /* UART5_TX */ + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + ; /* USART3_CTS_NSS */ }; pins2 { - pinmux = ; /* UART5_RX */ + pinmux = ; /* USART3_RX */ bias-disable; }; }; - uart5_sleep_pins_a: uart5-sleep-0 { + usart3_sleep_pins_c: usart3-sleep-2 { pins { - pinmux = , /* UART5_TX */ - ; /* UART5_RX */ + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + , /* USART3_CTS_NSS */ + ; /* USART3_RX */ }; }; - gt9147_irq:gt9147_irq { + usart6_pins_a: usart6-a-1 { + pins1 { + pinmux = ; /* USART6_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART6_RX */ + bias-disable; + }; + }; + + usart6_idle_pins_a: usart6-idle-a-2 { + pins1 { + pinmux = ; /* USART6_TX */ + }; + pins2 { + pinmux = ; /* USART6_RX */ + bias-disable; + }; + }; + + usart6_sleep_pins_a: usart6-sleep-a-2 { pins { - pinmux = ; /* PG7.GPIO */ - bias-pull-down; + pinmux = , /* USART6_TX */ + ; /* USART6_RX */ + }; + }; + + + i2c1_pins_b: i2c1-b-0 { + pins { + pinmux = , /* I2C1_SCL */ + ; /* I2C1_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + i2c1_pins_sleep_b: i2c1-b-1 { + pins { + pinmux = , /* I2C1_SCL */ + ; /* I2C1_SDA */ + }; + }; + + spi2_pins_a: spi2-0 { + pins1 { + pinmux = , /* SPI2_SCK */ + ; /* SPI2_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + + pins2 { + pinmux = ; /* SPI2_MISO */ + bias-disable; + }; + }; + + spi2_sleep_pins_a: spi2-sleep-0 { + pins { + pinmux = , /* SPI2_SCK */ + , /* SPI2_MISO */ + ; /* SPI2_MOSI */ + }; + }; + + bt_reg: bt_reg_on-1 { + pins { + pinmux = ; drive-push-pull; + bias-pull-up; + output-high; + slew-rate = <0>; + }; + }; +}; + +&pinctrl_z { + usart1_pins_a: usart1-0 { + pins1 { + pinmux = ; /* USART1_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_idle_pins_a: usart1-idle-0 { + pins1 { + pinmux = ; /* USART2_TX */ + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart1_sleep_pins_a: usart1-sleep-0 { + pins { + pinmux = , /* USART2_TX */ + ; /* USART2_RX */ + }; + }; + + i2c6_pins_a: i2c6-0 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + i2c6_pins_sleep_a: i2c6-1 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + }; + }; + + spi6_pins_a: spi6-0 { + pins1 { + pinmux = , /* SPI4_SCK */ + ; /* SPI4_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + + pins2 { + pinmux = ; /* SPI4_MISO */ + bias-disable; }; }; + spi6_sleep_pins_a: spi6-sleep-0 { + pins { + pinmux = , /* SPI4_SCK */ + , /* SPI4_MISO */ + ; /* SPI4_MOSI */ + }; + }; }; &cec { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&cec_pins_a>; - pinctrl-1 = <&cec_pins_sleep_a>; status = "disabled"; }; @@ -300,8 +676,8 @@ #address-cells = <1>; #size-cells = <0>; compatible = "snps,dwmac-mdio"; - phy0: ethernet-phy@0 { - reg = <0>; + phy0: ethernet-phy@7 { + reg = <7>; }; }; }; @@ -311,46 +687,56 @@ status = "okay"; }; -&i2c2 { +&i2c1 { pinctrl-names = "default", "sleep"; - pinctrl-0 = <&i2c2_pins_a>; - pinctrl-1 = <&i2c2_pins_sleep_a>; + pinctrl-0 = <&i2c1_pins_b>; + pinctrl-1 = <&i2c1_pins_sleep_b>; i2c-scl-rising-time-ns = <100>; i2c-scl-falling-time-ns = <7>; status = "okay"; /delete-property/dmas; /delete-property/dma-names; -/* - tsc2007: tsc2007@48 { - compatible = "ti,tsc2007"; - reg = <0x48>; - interrupt-parent = <&gpioi>; - interrupts = <8 IRQ_TYPE_EDGE_FALLING>; - interrupt-controller; - gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; - ti,x-plate-ohms = <660>; - }; -*/ - ft5x06: ft5x06@38 { - compatible = "edt,edt-ft5306"; - reg = <0x38>; - interrupts = <7 IRQ_TYPE_EDGE_FALLING>; - interrupt-parent = <&gpiog>; - interrupt-controller; - reset-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; + wm8904_codec: wm8904@1a { + compatible = "wlf,wm8904"; + #sound-dai-cells = <0>; + reg = <0x1a>; status = "okay"; - }; - gt9147@5d { - compatible = "goodix,gt9147"; - reg = <0x5d>; - pinctrl-names = "default"; - pinctrl-0 = <>9147_irq>; - irq-gpios = <&gpiog 7 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; - status = "okay"; + clocks = <&sai2a>; + clock-names = "mclk"; + + wm8904_port: port { + #address-cells = <1>; + #size-cells = <0>; + + wm8904_tx_endpoint: endpoint@0 { + reg = <0>; + remote-endpoint = <&sai2a_endpoint>; + frame-master; + bitclock-master; + }; + + wm8904_rx_endpoint: endpoint@1 { + reg = <1>; + remote-endpoint = <&sai2b_endpoint>; + frame-master; + bitclock-master; + }; + }; + }; +}; + +&i2c6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c6_pins_a>; + pinctrl-1 = <&i2c6_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; }; @@ -364,15 +750,30 @@ /delete-property/dmas; /delete-property/dma-names; -}; -&i2s2 { - clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>; - clock-names = "pclk", "i2sclk", "x8k", "x11k"; - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&i2s2_pins_b>; - pinctrl-1 = <&i2s2_pins_sleep_b>; - status = "disabled"; + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + clocks = <&clk_ext_camera>; + clock-names = "xclk"; + DOVDD-supply = <&v2v8>; + powerdown-gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; + rotation = <180>; + status = "okay"; + + port { + ov5640_0: endpoint { + remote-endpoint = <&dcmi_0>; + bus-width = <8>; + data-shift = <2>; /* lines 9:2 are used */ + hsync-active = <0>; + vsync-active = <0>; + pclk-sample = <1>; + pclk-max-frequency = <77000000>; + }; + }; + }; }; &ipcc { @@ -428,7 +829,43 @@ pinctrl-names = "default", "sleep"; pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>; pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>; - status = "disabled"; + status = "okay"; + + sai2a: audio-controller@4400b004 { + #clock-cells = <0>; + dma-names = "tx"; + clocks = <&rcc SAI2_K>; + clock-names = "sai_ck"; + status = "okay"; + + sai2a_port: port { + sai2a_endpoint: endpoint { + remote-endpoint = <&wm8904_tx_endpoint>; + format = "i2s"; + mclk-fs = <256>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <16>; + }; + }; + }; + + sai2b: audio-controller@4400b024 { + dma-names = "rx"; + st,sync = <&sai2a 2>; + clocks = <&rcc SAI2_K>, <&sai2a>; + clock-names = "sai_ck", "MCLK"; + status = "okay"; + + sai2b_port: port { + sai2b_endpoint: endpoint { + remote-endpoint = <&wm8904_rx_endpoint>; + format = "i2s"; + mclk-fs = <256>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <16>; + }; + }; + }; }; &sdmmc1 { @@ -457,18 +894,34 @@ status = "okay"; }; -&spi4 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&spi4_pins_a>; - pinctrl-1 = <&spi4_sleep_pins_a>; - status = "disabled"; +/* WiFi module */ +&sdmmc3 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc3_b4_pins_a>; + pinctrl-1 = <&sdmmc3_b4_od_pins_a>; + pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + st,neg-edge; + #address-cells = <1>; + #size-cells = <0>; + keep-power-in-suspend; + bus-width = <4>; + no-1-8-v; + status = "okay"; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; }; -&spi5 { +&spi2 { pinctrl-names = "default", "sleep"; - pinctrl-0 = <&spi5_pins_a>; - pinctrl-1 = <&spi5_sleep_pins_a>; - status = "disabled"; + pinctrl-0 = <&spi2_pins_a>; + pinctrl-1 = <&spi2_sleep_pins_a>; + status = "okay"; }; &timers2 { @@ -505,13 +958,66 @@ status = "okay"; }; +&usart1 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart1_pins_a>; + pinctrl-1 = <&usart1_sleep_pins_a>; + pinctrl-2 = <&usart1_idle_pins_a>; + rs485de-gpios = <&gpiof 12 1>; + status = "okay"; +}; + +&usart3 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart3_pins_c>; + pinctrl-1 = <&usart3_sleep_pins_c>; + pinctrl-2 = <&usart3_idle_pins_c>; + st,hw-flow-ctrl; + status = "okay"; + + bluetooth { + pinctrl-names = "default"; + pinctrl-0 = <&bt_reg>; + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; + }; + +}; + +&usart6 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart6_pins_a>; + pinctrl-1 = <&usart6_sleep_pins_a>; + pinctrl-2 = <&usart6_idle_pins_a>; + status = "okay"; +}; + + +&uart8 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&uart8_pins_a>; + pinctrl-1 = <&uart8_sleep_pins_a>; + pinctrl-2 = <&uart8_idle_pins_a>; + rs485de-gpios = <&gpioh 5 1>; + status = "okay"; +}; + &m_can1 { pinctrl-names = "default", "sleep"; - pinctrl-0 = <&m_can1_pins_a>; - pinctrl-1 = <&m_can1_sleep_pins_a>; + pinctrl-0 = <&m_can1_pins_b>; + pinctrl-1 = <&m_can1_sleep_pins_b>; status = "okay"; }; + +/* conflict with uart5 */ +&m_can2 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&m_can2_pins_a>; + pinctrl-1 = <&m_can2_sleep_pins_a>; + status = "disabled"; +}; + &qspi { pinctrl-names = "default", "sleep"; pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>; @@ -531,6 +1037,32 @@ }; }; +&dcmi { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&dcmi_pins_b>; + pinctrl-1 = <&dcmi_sleep_pins_b>; + status = "okay"; + + port { + dcmi_0: endpoint { + remote-endpoint = <&ov5640_0>; + bus-width = <8>; + hsync-active = <0>; + vsync-active = <0>; + pclk-sample = <1>; + pclk-max-frequency = <77000000>; + }; + }; +}; + +&spi6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi6_pins_a>; + pinctrl-1 = <&spi6_sleep_pins_a>; + cs-gpios = <&gpioz 3 0>; + status = "okay"; +}; + &usbh_ehci { phys = <&usbphyc_port0>; phy-names = "usb"; From 9ffcccb0a25c37121616c157e7f6d4b978c3c20a Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Wed, 18 Mar 2020 16:11:55 +0800 Subject: [PATCH 24/54] arm:dts add i2M-GiantAxe board with PanGu Board The i2M-GiantAxe board is a extension board for PanGu board. It's adds 4G LTE slot, WiFi & BT module, RS232, RS485, CAN, I2C, SPI and TIM1 signal. --- .../stm32mp157a-panguboard-hdmi-giantaxe.dts | 260 ++++++++++++++++++ arch/arm/boot/dts/stm32mp157a-panguboard.dts | 2 +- 2 files changed, 261 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts new file mode 100644 index 00000000000000..bbaea1031b52d5 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts @@ -0,0 +1,260 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) STMicroelectronics 2018 - All Rights Reserved + * Author: Alexandre Torgue . + */ + +/dts-v1/; + +#include "stm32mp157a-panguboard.dts" + +/ { + model = "i2SOM PanGu Board and GiantAxe"; + compatible = "i2som,panguboard", "st,stm32mp157"; + + aliases { + serial0 = &uart4; + serial3 = &usart1; + serial1 = &usart2; + serial2 = &usart3; + serial4 = &uart5; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; + }; + +}; + +&pinctrl { + + usart3_pins_c: usart3-2 { + pins1 { + pinmux = , /* USART3_TX */ + ; /* USART3_RTS */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = , /* USART3_RX */ + ; /* USART3_CTS_NSS */ + bias-disable; + }; + }; + + usart3_idle_pins_c: usart3-idle-2 { + pins1 { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + ; /* USART3_CTS_NSS */ + }; + pins2 { + pinmux = ; /* USART3_RX */ + bias-disable; + }; + }; + + usart3_sleep_pins_c: usart3-sleep-2 { + pins { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + , /* USART3_CTS_NSS */ + ; /* USART3_RX */ + }; + }; + + bt_reg: bt_reg_on-1 { + pins { + pinmux = ; + drive-push-pull; + bias-pull-up; + output-high; + slew-rate = <0>; + }; + }; + + usart2_pins_b: usart2-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_idle_pins_b: usart2-idle-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_sleep_pins_b: usart2-sleep-b-0 { + pins { + pinmux = , /* USART2_TX */ + ; /* USART2_RX */ + }; + }; + +}; + +&pinctrl_z { + usart1_pins_a: usart1-0 { + pins1 { + pinmux = ; /* USART1_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_idle_pins_a: usart1-idle-0 { + pins1 { + pinmux = ; /* USART1_TX */ + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_sleep_pins_a: usart1-sleep-0 { + pins { + pinmux = , /* USART1_TX */ + ; /* USART1_RX */ + }; + }; + + i2c6_pins_a: i2c6-0 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + i2c6_pins_sleep_a: i2c6-1 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + }; + }; + + spi6_pins_a: spi6-0 { + pins1 { + pinmux = , /* SPI4_SCK */ + ; /* SPI4_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + + pins2 { + pinmux = ; /* SPI4_MISO */ + bias-disable; + }; + }; + + spi6_sleep_pins_a: spi6-sleep-0 { + pins { + pinmux = , /* SPI4_SCK */ + , /* SPI4_MISO */ + ; /* SPI4_MOSI */ + }; + }; +}; + +&i2c6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c6_pins_a>; + pinctrl-1 = <&i2c6_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + +}; + +&usart1 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart1_pins_a>; + pinctrl-1 = <&usart1_sleep_pins_a>; + pinctrl-2 = <&usart1_idle_pins_a>; + status = "okay"; +}; + +&usart2 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart2_pins_b>; + pinctrl-1 = <&usart2_sleep_pins_b>; + pinctrl-2 = <&usart2_idle_pins_b>; + status = "okay"; +}; + +&usart3 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart3_pins_c>; + pinctrl-1 = <&usart3_sleep_pins_c>; + pinctrl-2 = <&usart3_idle_pins_c>; + st,hw-flow-ctrl; + status = "okay"; + + bluetooth { + pinctrl-names = "default"; + pinctrl-0 = <&bt_reg>; + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; + }; + +}; + +&uart5 { + rs485de-gpios = <&gpiog 9 1>; +}; + +&spi6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi6_pins_a>; + pinctrl-1 = <&spi6_sleep_pins_a>; + cs-gpios = <&gpioz 3 0>; + status = "okay"; +}; + +/* WiFi module */ +&sdmmc3 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc3_b4_pins_a>; + pinctrl-1 = <&sdmmc3_b4_od_pins_a>; + pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + st,neg-edge; + #address-cells = <1>; + #size-cells = <0>; + keep-power-in-suspend; + bus-width = <4>; + no-1-8-v; + status = "okay"; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard.dts b/arch/arm/boot/dts/stm32mp157a-panguboard.dts index 652dcf59b7cf95..b0ab1b9374abd3 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard.dts @@ -19,7 +19,7 @@ aliases { ethernet0 = ðernet0; serial0 = &uart4; - serial1 = &uart5; + serial4 = &uart5; }; chosen { From b170efd347a4c504a8b1b54f3f13f04b90a4d974 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Wed, 18 Mar 2020 16:50:01 +0800 Subject: [PATCH 25/54] arm:dts: add dts for i2M-GiantAxe board --- arch/arm/boot/dts/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index c7d57c2b7dc867..388c31eeedf06e 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -931,6 +931,7 @@ dtb-$(CONFIG_ARCH_STM32) += \ stm32mp157c-ev1-a7-examples.dtb \ stm32mp157c-ev1-m4-examples.dtb \ stm32mp157a-panguboard.dtb \ + stm32mp157a-panguboard-hdmi-giantaxe.dtb \ stm32mp157a-panguboard-mipi.dtb \ stm32mp157a-panguboard-lcd043p800c.dtb \ stm32mp157a-panguboard-lcd070p1024c.dtb \ From cd86c75481453b0799209cdd77f323adf2135aa6 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Wed, 18 Mar 2020 17:12:59 +0800 Subject: [PATCH 26/54] arm:configs: enable some kernel driver The i2C-MP15X-B board has wm8904 and ksz9301 chip. --- arch/arm/configs/i2som_panguboard_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/i2som_panguboard_defconfig b/arch/arm/configs/i2som_panguboard_defconfig index b890a60cfeaca5..6af5c25556d415 100644 --- a/arch/arm/configs/i2som_panguboard_defconfig +++ b/arch/arm/configs/i2som_panguboard_defconfig @@ -171,7 +171,7 @@ CONFIG_AT803X_PHY=m CONFIG_BCM7XXX_PHY=m CONFIG_BROADCOM_PHY=y CONFIG_MARVELL_PHY=m -CONFIG_MICREL_PHY=m +CONFIG_MICREL_PHY=y CONFIG_SMSC_PHY=m CONFIG_USB_PEGASUS=y CONFIG_USB_RTL8152=m @@ -325,6 +325,7 @@ CONFIG_SND_SOC_CS42L51_I2C=y CONFIG_SND_SOC_SGTL5000=m CONFIG_SND_SOC_STI_SAS=m CONFIG_SND_SOC_TLV320AIC23_I2C=m +CONFIG_SND_SOC_WM8904=m CONFIG_SND_SIMPLE_CARD=m CONFIG_SND_SIMPLE_SCU_CARD=m CONFIG_SND_AUDIO_GRAPH_CARD=y From ed7600b8907c4912ed83a30973bf7477761f7386 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 27 Mar 2020 14:52:16 +0800 Subject: [PATCH 27/54] arm:dts: add property for sdmmc3 --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index ee88ac36cf1709..b68c69f8e00f40 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -566,7 +566,7 @@ bt_reg: bt_reg_on-1 { pins { - pinmux = ; + pinmux = ; drive-push-pull; bias-pull-up; output-high; @@ -591,18 +591,18 @@ usart1_idle_pins_a: usart1-idle-0 { pins1 { - pinmux = ; /* USART2_TX */ + pinmux = ; /* USART1_TX */ }; pins2 { - pinmux = ; /* USART2_RX */ + pinmux = ; /* USART1_RX */ bias-disable; }; }; usart1_sleep_pins_a: usart1-sleep-0 { pins { - pinmux = , /* USART2_TX */ - ; /* USART2_RX */ + pinmux = , /* USART1_TX */ + ; /* USART1_RX */ }; }; @@ -896,6 +896,7 @@ /* WiFi module */ &sdmmc3 { + arm,primecell-periphid = <0x10153180>; pinctrl-names = "default", "opendrain", "sleep"; pinctrl-0 = <&sdmmc3_b4_pins_a>; pinctrl-1 = <&sdmmc3_b4_od_pins_a>; From 7ef93b89acafa54e077d0425517f5022f0b70dc8 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Thu, 2 Apr 2020 22:52:43 +0800 Subject: [PATCH 28/54] arm:dts: add i2M-GiantAxe module with different modes --- arch/arm/boot/dts/Makefile | 3 + .../stm32mp157a-panguboard-hdmi-giantaxe.dts | 25 ++ ...mp157a-panguboard-lcd043p800c-giantaxe.dts | 264 ++++++++++++++ ...p157a-panguboard-lcd070p1024c-giantaxe.dts | 264 ++++++++++++++ .../stm32mp157a-panguboard-mipi-giantaxe.dts | 337 ++++++++++++++++++ 5 files changed, 893 insertions(+) create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c-giantaxe.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c-giantaxe.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard-mipi-giantaxe.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 388c31eeedf06e..df90382d898ca6 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -933,8 +933,11 @@ dtb-$(CONFIG_ARCH_STM32) += \ stm32mp157a-panguboard.dtb \ stm32mp157a-panguboard-hdmi-giantaxe.dtb \ stm32mp157a-panguboard-mipi.dtb \ + stm32mp157a-panguboard-mipi-giantaxe.dtb \ stm32mp157a-panguboard-lcd043p800c.dtb \ + stm32mp157a-panguboard-lcd043p800c-giantaxe.dtb \ stm32mp157a-panguboard-lcd070p1024c.dtb \ + stm32mp157a-panguboard-lcd070p1024c-giantaxe.dtb \ stm32mp157a-i2cmp15xbn-lcd043p800c.dtb \ stm32mp157a-i2cmp15xbn-lcd070p1024c.dtb \ stm32mp157a-i2cmp15xbe-lcd043p800c.dtb \ diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts index bbaea1031b52d5..49e8507a257431 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts @@ -105,6 +105,20 @@ }; }; + timer1_pins: pwm1-test-0 { + pins { + pinmux = , /* TIM1_CH1 */ + , /* TIM1_CH1N */ + , /* TIM1_CH2 */ + , /* TIM1_CH2N */ + , /* TIM1_CH3 */ + , /* TIM1_CH3N */ + ; /* TIM1_CH4 */ + bias-pull-down; + drive-push-pull; + slew-rate = <0>; + }; + }; }; &pinctrl_z { @@ -179,6 +193,16 @@ }; }; +&timers1 { + status = "disabled"; +}; + +&m4_timers1 { + pinctrl-names = "rproc_default"; + pinctrl-0 = <&timer1_pins>; + status = "okay"; +}; + &i2c6 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&i2c6_pins_a>; @@ -238,6 +262,7 @@ /* WiFi module */ &sdmmc3 { + arm,primecell-periphid = <0x10153180>; pinctrl-names = "default", "opendrain", "sleep"; pinctrl-0 = <&sdmmc3_b4_pins_a>; pinctrl-1 = <&sdmmc3_b4_od_pins_a>; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c-giantaxe.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c-giantaxe.dts new file mode 100644 index 00000000000000..75153a95d4acd9 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c-giantaxe.dts @@ -0,0 +1,264 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-panguboard-lcd.dts" + +/ { + model = "i2SOM PanGu Board and GiantAxe"; + compatible = "i2som,panguboard", "st,stm32mp157"; + + aliases { + serial0 = &uart4; + serial3 = &usart1; + serial1 = &usart2; + serial2 = &usart3; + serial4 = &uart5; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; + }; +}; + +&panel_rgb { + compatible = "innolux,at070tn92"; +}; + +&pinctrl { + + usart3_pins_c: usart3-2 { + pins1 { + pinmux = , /* USART3_TX */ + ; /* USART3_RTS */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = , /* USART3_RX */ + ; /* USART3_CTS_NSS */ + bias-disable; + }; + }; + + usart3_idle_pins_c: usart3-idle-2 { + pins1 { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + ; /* USART3_CTS_NSS */ + }; + pins2 { + pinmux = ; /* USART3_RX */ + bias-disable; + }; + }; + + usart3_sleep_pins_c: usart3-sleep-2 { + pins { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + , /* USART3_CTS_NSS */ + ; /* USART3_RX */ + }; + }; + + bt_reg: bt_reg_on-1 { + pins { + pinmux = ; + drive-push-pull; + bias-pull-up; + output-high; + slew-rate = <0>; + }; + }; + + usart2_pins_b: usart2-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_idle_pins_b: usart2-idle-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_sleep_pins_b: usart2-sleep-b-0 { + pins { + pinmux = , /* USART2_TX */ + ; /* USART2_RX */ + }; + }; + +}; + +&pinctrl_z { + usart1_pins_a: usart1-0 { + pins1 { + pinmux = ; /* USART1_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_idle_pins_a: usart1-idle-0 { + pins1 { + pinmux = ; /* USART1_TX */ + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_sleep_pins_a: usart1-sleep-0 { + pins { + pinmux = , /* USART1_TX */ + ; /* USART1_RX */ + }; + }; + + i2c6_pins_a: i2c6-0 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + i2c6_pins_sleep_a: i2c6-1 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + }; + }; + + spi6_pins_a: spi6-0 { + pins1 { + pinmux = , /* SPI4_SCK */ + ; /* SPI4_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + + pins2 { + pinmux = ; /* SPI4_MISO */ + bias-disable; + }; + }; + + spi6_sleep_pins_a: spi6-sleep-0 { + pins { + pinmux = , /* SPI4_SCK */ + , /* SPI4_MISO */ + ; /* SPI4_MOSI */ + }; + }; +}; + +&i2c6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c6_pins_a>; + pinctrl-1 = <&i2c6_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + +}; + +&usart1 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart1_pins_a>; + pinctrl-1 = <&usart1_sleep_pins_a>; + pinctrl-2 = <&usart1_idle_pins_a>; + status = "okay"; +}; + +&usart2 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart2_pins_b>; + pinctrl-1 = <&usart2_sleep_pins_b>; + pinctrl-2 = <&usart2_idle_pins_b>; + status = "okay"; +}; + +&usart3 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart3_pins_c>; + pinctrl-1 = <&usart3_sleep_pins_c>; + pinctrl-2 = <&usart3_idle_pins_c>; + st,hw-flow-ctrl; + status = "okay"; + + bluetooth { + pinctrl-names = "default"; + pinctrl-0 = <&bt_reg>; + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; + }; + +}; + +&uart5 { + rs485de-gpios = <&gpiog 9 1>; +}; + +&spi6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi6_pins_a>; + pinctrl-1 = <&spi6_sleep_pins_a>; + cs-gpios = <&gpioz 3 0>; + status = "okay"; +}; + +/* WiFi module */ +&sdmmc3 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc3_b4_pins_a>; + pinctrl-1 = <&sdmmc3_b4_od_pins_a>; + pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + st,neg-edge; + #address-cells = <1>; + #size-cells = <0>; + keep-power-in-suspend; + bus-width = <4>; + no-1-8-v; + status = "okay"; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c-giantaxe.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c-giantaxe.dts new file mode 100644 index 00000000000000..b6511863a955b6 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c-giantaxe.dts @@ -0,0 +1,264 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-panguboard-lcd.dts" + +/ { + model = "i2SOM PanGu Board and GiantAxe"; + compatible = "i2som,panguboard", "st,stm32mp157"; + + aliases { + serial0 = &uart4; + serial3 = &usart1; + serial1 = &usart2; + serial2 = &usart3; + serial4 = &uart5; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; + }; +}; + +&panel_rgb { + compatible = "innolux,zj070na-01p"; +}; + +&pinctrl { + + usart3_pins_c: usart3-2 { + pins1 { + pinmux = , /* USART3_TX */ + ; /* USART3_RTS */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = , /* USART3_RX */ + ; /* USART3_CTS_NSS */ + bias-disable; + }; + }; + + usart3_idle_pins_c: usart3-idle-2 { + pins1 { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + ; /* USART3_CTS_NSS */ + }; + pins2 { + pinmux = ; /* USART3_RX */ + bias-disable; + }; + }; + + usart3_sleep_pins_c: usart3-sleep-2 { + pins { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + , /* USART3_CTS_NSS */ + ; /* USART3_RX */ + }; + }; + + bt_reg: bt_reg_on-1 { + pins { + pinmux = ; + drive-push-pull; + bias-pull-up; + output-high; + slew-rate = <0>; + }; + }; + + usart2_pins_b: usart2-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_idle_pins_b: usart2-idle-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_sleep_pins_b: usart2-sleep-b-0 { + pins { + pinmux = , /* USART2_TX */ + ; /* USART2_RX */ + }; + }; + +}; + +&pinctrl_z { + usart1_pins_a: usart1-0 { + pins1 { + pinmux = ; /* USART1_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_idle_pins_a: usart1-idle-0 { + pins1 { + pinmux = ; /* USART1_TX */ + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_sleep_pins_a: usart1-sleep-0 { + pins { + pinmux = , /* USART1_TX */ + ; /* USART1_RX */ + }; + }; + + i2c6_pins_a: i2c6-0 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + i2c6_pins_sleep_a: i2c6-1 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + }; + }; + + spi6_pins_a: spi6-0 { + pins1 { + pinmux = , /* SPI4_SCK */ + ; /* SPI4_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + + pins2 { + pinmux = ; /* SPI4_MISO */ + bias-disable; + }; + }; + + spi6_sleep_pins_a: spi6-sleep-0 { + pins { + pinmux = , /* SPI4_SCK */ + , /* SPI4_MISO */ + ; /* SPI4_MOSI */ + }; + }; +}; + +&i2c6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c6_pins_a>; + pinctrl-1 = <&i2c6_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + +}; + +&usart1 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart1_pins_a>; + pinctrl-1 = <&usart1_sleep_pins_a>; + pinctrl-2 = <&usart1_idle_pins_a>; + status = "okay"; +}; + +&usart2 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart2_pins_b>; + pinctrl-1 = <&usart2_sleep_pins_b>; + pinctrl-2 = <&usart2_idle_pins_b>; + status = "okay"; +}; + +&usart3 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart3_pins_c>; + pinctrl-1 = <&usart3_sleep_pins_c>; + pinctrl-2 = <&usart3_idle_pins_c>; + st,hw-flow-ctrl; + status = "okay"; + + bluetooth { + pinctrl-names = "default"; + pinctrl-0 = <&bt_reg>; + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; + }; + +}; + +&uart5 { + rs485de-gpios = <&gpiog 9 1>; +}; + +&spi6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi6_pins_a>; + pinctrl-1 = <&spi6_sleep_pins_a>; + cs-gpios = <&gpioz 3 0>; + status = "okay"; +}; + +/* WiFi module */ +&sdmmc3 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc3_b4_pins_a>; + pinctrl-1 = <&sdmmc3_b4_od_pins_a>; + pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + st,neg-edge; + #address-cells = <1>; + #size-cells = <0>; + keep-power-in-suspend; + bus-width = <4>; + no-1-8-v; + status = "okay"; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-mipi-giantaxe.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi-giantaxe.dts new file mode 100644 index 00000000000000..636d6c48f13e3b --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi-giantaxe.dts @@ -0,0 +1,337 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-panguboard.dts" +#include + +/ { + model = "i2SOM PanGu Board MIPI"; + compatible = "i2som,pangu", "st,stm32mp157"; + + aliases { + serial0 = &uart4; + serial3 = &usart1; + serial1 = &usart2; + serial2 = &usart3; + serial4 = &uart5; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; + }; +}; + +&dsi { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + remote-endpoint = <<dc_ep1_out>; + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + + panel@0 { + compatible = "orisetech,otm8009a"; + reg = <0>; + reset-gpios = <&gpioc 7 GPIO_ACTIVE_LOW>; + status = "okay"; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; +}; + +&i2c2 { + touchscreen@2a { + compatible = "focaltech,ft6236"; + reg = <0x2a>; + interrupts = <13 2>; + interrupt-parent = <&gpioc>; + interrupt-controller; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + status = "okay"; + }; + + touchscreen@38 { + compatible = "focaltech,ft6336"; + reg = <0x38>; + interrupts = <13 2>; + interrupt-parent = <&gpioc>; + interrupt-controller; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + status = "okay"; + }; +}; + +<dc { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + ltdc_ep1_out: endpoint@1 { + reg = <1>; + remote-endpoint = <&dsi_in>; + }; + }; +}; + +&pinctrl { + + usart3_pins_c: usart3-2 { + pins1 { + pinmux = , /* USART3_TX */ + ; /* USART3_RTS */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = , /* USART3_RX */ + ; /* USART3_CTS_NSS */ + bias-disable; + }; + }; + + usart3_idle_pins_c: usart3-idle-2 { + pins1 { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + ; /* USART3_CTS_NSS */ + }; + pins2 { + pinmux = ; /* USART3_RX */ + bias-disable; + }; + }; + + usart3_sleep_pins_c: usart3-sleep-2 { + pins { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + , /* USART3_CTS_NSS */ + ; /* USART3_RX */ + }; + }; + + bt_reg: bt_reg_on-1 { + pins { + pinmux = ; + drive-push-pull; + bias-pull-up; + output-high; + slew-rate = <0>; + }; + }; + + usart2_pins_b: usart2-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_idle_pins_b: usart2-idle-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_sleep_pins_b: usart2-sleep-b-0 { + pins { + pinmux = , /* USART2_TX */ + ; /* USART2_RX */ + }; + }; + +}; + +&pinctrl_z { + usart1_pins_a: usart1-0 { + pins1 { + pinmux = ; /* USART1_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_idle_pins_a: usart1-idle-0 { + pins1 { + pinmux = ; /* USART1_TX */ + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_sleep_pins_a: usart1-sleep-0 { + pins { + pinmux = , /* USART1_TX */ + ; /* USART1_RX */ + }; + }; + + i2c6_pins_a: i2c6-0 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + i2c6_pins_sleep_a: i2c6-1 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + }; + }; + + spi6_pins_a: spi6-0 { + pins1 { + pinmux = , /* SPI4_SCK */ + ; /* SPI4_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + + pins2 { + pinmux = ; /* SPI4_MISO */ + bias-disable; + }; + }; + + spi6_sleep_pins_a: spi6-sleep-0 { + pins { + pinmux = , /* SPI4_SCK */ + , /* SPI4_MISO */ + ; /* SPI4_MOSI */ + }; + }; +}; + +&i2c6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c6_pins_a>; + pinctrl-1 = <&i2c6_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + +}; + +&usart1 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart1_pins_a>; + pinctrl-1 = <&usart1_sleep_pins_a>; + pinctrl-2 = <&usart1_idle_pins_a>; + status = "okay"; +}; + +&usart2 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart2_pins_b>; + pinctrl-1 = <&usart2_sleep_pins_b>; + pinctrl-2 = <&usart2_idle_pins_b>; + status = "okay"; +}; + +&usart3 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart3_pins_c>; + pinctrl-1 = <&usart3_sleep_pins_c>; + pinctrl-2 = <&usart3_idle_pins_c>; + st,hw-flow-ctrl; + status = "okay"; + + bluetooth { + pinctrl-names = "default"; + pinctrl-0 = <&bt_reg>; + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; + }; + +}; + +&uart5 { + rs485de-gpios = <&gpiog 9 1>; +}; + +&spi6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi6_pins_a>; + pinctrl-1 = <&spi6_sleep_pins_a>; + cs-gpios = <&gpioz 3 0>; + status = "okay"; +}; + +/* WiFi module */ +&sdmmc3 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc3_b4_pins_a>; + pinctrl-1 = <&sdmmc3_b4_od_pins_a>; + pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + st,neg-edge; + #address-cells = <1>; + #size-cells = <0>; + keep-power-in-suspend; + bus-width = <4>; + no-1-8-v; + status = "okay"; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; From 67625ba40d85d7a3e27d5701f475c736156bd992 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 4 Apr 2020 17:18:57 +0800 Subject: [PATCH 29/54] tty:serial: add rs485 txen-gpio --- drivers/tty/serial/stm32-usart.c | 16 ++++++++++++++++ drivers/tty/serial/stm32-usart.h | 1 + 2 files changed, 17 insertions(+) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index cee30aaee6a24d..ab92c51bf22f1c 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "stm32-usart.h" @@ -148,6 +149,9 @@ static int stm32_config_rs485(struct uart_port *port, USART_CR1_DEDT_MASK | USART_CR1_DEAT_MASK); } + if (stm32_port->txen_gpio) + gpiod_set_value(stm32_port->txen_gpio, 0); + stm32_set_bits(port, ofs->cr1, BIT(cfg->uart_enable_bit)); spin_unlock_irqrestore(&port->lock, flags); @@ -158,6 +162,7 @@ static int stm32_init_rs485(struct uart_port *port, struct platform_device *pdev) { struct serial_rs485 *rs485conf = &port->rs485; + struct stm32_port *stm32_port = to_stm32_port(port); rs485conf->flags = 0; rs485conf->delay_rts_before_send = 0; @@ -168,6 +173,8 @@ static int stm32_init_rs485(struct uart_port *port, uart_get_rs485_mode(&pdev->dev, rs485conf); + stm32_ports->txen_gpio = devm_gpiod_get(&pdev->dev, "rs485de", GPIOD_OUT_LOW); + return 0; } @@ -568,16 +575,25 @@ static void stm32_stop_tx(struct uart_port *port) dmaengine_terminate_async(stm32_port->tx_ch); stm32_clr_bits(port, ofs->cr3, USART_CR3_DMAT); } + + if (stm32_port->txen_gpio) { + gpiod_set_value(stm32_port->txen_gpio, 0); + } } /* There are probably characters waiting to be transmitted. */ static void stm32_start_tx(struct uart_port *port) { struct circ_buf *xmit = &port->state->xmit; + struct stm32_port *stm32_port = to_stm32_port(port); if (uart_circ_empty(xmit)) return; + if (stm32_port->txen_gpio) { + gpiod_set_value(stm32_port->txen_gpio, 1); + } + stm32_transmit_chars(port); } diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h index 2a68bc48652e7a..ca48411d2cd253 100644 --- a/drivers/tty/serial/stm32-usart.h +++ b/drivers/tty/serial/stm32-usart.h @@ -279,6 +279,7 @@ struct stm32_port { int wakeirq; struct pinctrl_state *console_pins; int rdr_mask; /* receive data register mask */ + struct gpio_desc *txen_gpio; }; static struct stm32_port stm32_ports[STM32_MAX_PORTS]; From aa9b43eba4bbc4e2a8a15e763515f72bf58c4403 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 6 Apr 2020 01:27:45 +0800 Subject: [PATCH 30/54] arm:dts adjust value for KSZ9031 --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index b68c69f8e00f40..fa33b0a7b9abcd 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -678,6 +678,10 @@ compatible = "snps,dwmac-mdio"; phy0: ethernet-phy@7 { reg = <7>; + rxc-skew-ps = <1200>; + rxdv-skew-ps = <700>; + txc-skew-ps = <1200>; + txen-skew-ps = <700>; }; }; }; From 51439d29678f9e5f6a5f03f07a57a515c6a7339f Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 6 Apr 2020 15:06:17 +0800 Subject: [PATCH 31/54] arm:dts change reg id when using LTDC and MIPI --- .../boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts | 92 +++++++++++++++++++ arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 4 +- 2 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts new file mode 100644 index 00000000000000..810fe731709038 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-i2cmp15xbe.dts" +#include + +/ { + model = "i2SOM i2C-MP15X-C Board MiPi Display"; + compatible = "i2som,pangu", "st,stm32mp157"; +}; + +&dsi { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + remote-endpoint = <<dc_ep1_out>; + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + + panel@0 { + compatible = "orisetech,otm8009a"; + reg = <0>; + reset-gpios = <&gpioc 3 GPIO_ACTIVE_LOW>; + status = "okay"; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; +}; + +&i2c1 { + touchscreen@2a { + compatible = "focaltech,ft6236"; + reg = <0x2a>; + interrupts = <5 2>; + interrupt-parent = <&gpiob>; + interrupt-controller; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + status = "okay"; + }; + + touchscreen@38 { + compatible = "focaltech,ft6336"; + reg = <0x38>; + interrupts = <5 2>; + interrupt-parent = <&gpiob>; + interrupt-controller; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + status = "okay"; + }; +}; + +<dc { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + ltdc_ep1_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&dsi_in>; + }; + }; +}; + diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index fa33b0a7b9abcd..0ab681062199a4 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -796,8 +796,8 @@ #address-cells = <1>; #size-cells = <0>; - ltdc_out_rgb: endpoint@0 { - reg = <0>; + ltdc_out_rgb: endpoint@1 { + reg = <1>; remote-endpoint = <&panel_in_rgb>; }; }; From 90681212bbf183e4d0a53f335bc8f408902fad1e Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 6 Apr 2020 15:07:04 +0800 Subject: [PATCH 32/54] arm:dts enable dual CAN config The uart5 and can2 has conflict with pinmux. --- ...32mp157a-i2cmp15xbe-lcd043p800c-dualcan.dts | 17 +++++++++++++++++ ...2mp157a-i2cmp15xbe-lcd070p1024c-dualcan.dts | 18 ++++++++++++++++++ .../stm32mp157a-i2cmp15xbe-mipi-dualcan.dts | 18 ++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c-dualcan.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c-dualcan.dts create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi-dualcan.dts diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c-dualcan.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c-dualcan.dts new file mode 100644 index 00000000000000..471c8fbf2bf7a8 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c-dualcan.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-i2cmp15xbe-lcd070p1024c.dts" + +&m_can2 { + status = "okay"; +}; + +&uart5 { + status = "disabled"; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c-dualcan.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c-dualcan.dts new file mode 100644 index 00000000000000..0ac944b868cd1d --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c-dualcan.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-i2cmp15xbe-lcd070p1024c.dts" + +&m_can2 { + status = "okay"; +}; + +&uart5 { + status = "disabled"; +}; + diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi-dualcan.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi-dualcan.dts new file mode 100644 index 00000000000000..491b2d8a89b4e3 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi-dualcan.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-i2cmp15xbe-mipi.dts" + +&m_can2 { + status = "okay"; +}; + +&uart5 { + status = "disabled"; +}; + From 069c68f830b08a07d341df4ab6f5b94ad0cd778a Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 6 Apr 2020 15:09:45 +0800 Subject: [PATCH 33/54] arm:dts add i2S-MP15x NAND variant model --- arch/arm/boot/dts/Makefile | 7 +- .../stm32mp157a-i2cmp15xbn-lcd043p800c.dts | 13 + .../stm32mp157a-i2cmp15xbn-lcd070p1024c.dts | 24 + .../boot/dts/stm32mp157a-i2cmp15xbn-mipi.dts | 92 +++ arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts | 659 ++++++++++++++++-- 5 files changed, 741 insertions(+), 54 deletions(-) create mode 100644 arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-mipi.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index df90382d898ca6..49dc72d153e50b 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -940,8 +940,13 @@ dtb-$(CONFIG_ARCH_STM32) += \ stm32mp157a-panguboard-lcd070p1024c-giantaxe.dtb \ stm32mp157a-i2cmp15xbn-lcd043p800c.dtb \ stm32mp157a-i2cmp15xbn-lcd070p1024c.dtb \ + stm32mp157a-i2cmp15xbn-mipi.dtb \ stm32mp157a-i2cmp15xbe-lcd043p800c.dtb \ - stm32mp157a-i2cmp15xbe-lcd070p1024c.dtb + stm32mp157a-i2cmp15xbe-lcd070p1024c.dtb \ + stm32mp157a-i2cmp15xbe-mipi.dtb \ + stm32mp157a-i2cmp15xbe-lcd043p800c-dualcan.dtb \ + stm32mp157a-i2cmp15xbe-lcd070p1024c-dualcan.dtb \ + stm32mp157a-i2cmp15xbe-mipi-dualcan.dtb dtb-$(CONFIG_MACH_SUN4I) += \ sun4i-a10-a1000.dtb \ sun4i-a10-ba10-tvbox.dtb \ diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd043p800c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd043p800c.dts index 9457624fb51ea0..ad3fedc1333450 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd043p800c.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd043p800c.dts @@ -11,3 +11,16 @@ &panel_rgb { compatible = "innolux,at070tn92"; }; + +&i2c1 { + + gt9147@5d { + compatible = "goodix,gt9147"; + reg = <0x5d>; + pinctrl-names = "default"; + pinctrl-0 = <>9147_irq>; + irq-gpios = <&gpiog 7 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpiof 13 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd070p1024c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd070p1024c.dts index 9932725970cd1a..037c7000e69b7e 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd070p1024c.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-lcd070p1024c.dts @@ -11,3 +11,27 @@ &panel_rgb { compatible = "innolux,zj070na-01p"; }; + +&i2c1 { +/* + tsc2007: tsc2007@48 { + compatible = "ti,tsc2007"; + reg = <0x48>; + interrupt-parent = <&gpioi>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + interrupt-controller; + gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; + ti,x-plate-ohms = <660>; + }; +*/ + ft5x06: ft5x06@38 { + compatible = "edt,edt-ft5306"; + reg = <0x38>; + interrupts = <7 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpiog>; + interrupt-controller; + reset-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; + status = "okay"; + }; +}; + diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-mipi.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-mipi.dts new file mode 100644 index 00000000000000..4aa1bf8a74b985 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn-mipi.dts @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157a-i2cmp15xbn.dts" +#include + +/ { + model = "i2SOM i2C-MP15X-C Board MiPi Display"; + compatible = "i2som,pangu", "st,stm32mp157"; +}; + +&dsi { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + remote-endpoint = <<dc_ep1_out>; + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + + panel@0 { + compatible = "orisetech,otm8009a"; + reg = <0>; + reset-gpios = <&gpioc 3 GPIO_ACTIVE_LOW>; + status = "okay"; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; +}; + +&i2c1 { + touchscreen@2a { + compatible = "focaltech,ft6236"; + reg = <0x2a>; + interrupts = <5 2>; + interrupt-parent = <&gpiob>; + interrupt-controller; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + status = "okay"; + }; + + touchscreen@38 { + compatible = "focaltech,ft6336"; + reg = <0x38>; + interrupts = <5 2>; + interrupt-parent = <&gpiob>; + interrupt-controller; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + status = "okay"; + }; +}; + +<dc { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + ltdc_ep1_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&dsi_in>; + }; + }; +}; + diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts index cfcbb72641cd5f..78d3e514045d75 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts @@ -109,6 +109,17 @@ }; }; + keys { + compatible = "gpio-keys"; + + user { + label = "user"; + gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>; + gpio-key,wakeup; + linux,code = ; + }; + }; + usb_phy_tuning: usb-phy-tuning { st,hs-dc-level = <2>; st,fs-rftime-tuning; @@ -128,7 +139,7 @@ regulator-always-on; regulator-boot-on; }; - + vdd: regulator-vdd { compatible = "regulator-fixed"; regulator-name = "vdd"; @@ -165,9 +176,14 @@ regulator-boot-on; }; + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpiof 2 GPIO_ACTIVE_LOW>; + }; + panel_backlight: panel-backlight { compatible = "pwm-backlight"; - pwms = <&pwm2 0 500000>; + pwms = <&pwm2 3 500000>; brightness-levels = <0 4 8 14 18 24 28 34 38 44 48 54 58 64 68 74 78 84 88 96 112 128 144 160 176 192 194 196 200 255>; default-brightness-level = <6>; status = "okay"; @@ -190,13 +206,32 @@ }; }; + sound { + compatible = "audio-graph-card"; + label = "wm8904-KenQue"; + mclk-fs = <256>; + dai-format = "i2s"; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Line", "Line In Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Headphone Jack", "HPOUTL", + "Headphone Jack", "HPOUTR", + "MICBIAS", "Mic Jack", + "IN1L", "MICBIAS", + "IN2L", "Line In Jack", + "IN2R", "Line In Jack"; + dais = <&sai2a_port &sai2b_port>; + status = "okay"; + }; }; &pinctrl { pwm2_pins_b: pwm2-0 { pins { - pinmux = ; /* TIM2_CH1 */ + pinmux = ; /* TIM2_CH1 */ bias-pull-down; drive-push-pull; slew-rate = <0>; @@ -205,7 +240,7 @@ pwm2_sleep_pins_b: pwm2-sleep-0 { pins { - pinmux = ; /* TIM2_CH1 */ + pinmux = ; /* TIM2_CH1 */ }; }; @@ -266,12 +301,369 @@ }; }; + dcmi_pins_b: dcmi-1 { + pins { + pinmux = ,/* DCMI_HSYNC */ + ,/* DCMI_VSYNC */ + ,/* DCMI_PIXCLK */ + ,/* DCMI_D0 */ + ,/* DCMI_D1 */ + ,/* DCMI_D2 */ + ,/* DCMI_D3 */ + ,/* DCMI_D4 */ + ,/* DCMI_D5 */ + ,/* DCMI_D6 */ + ;/* DCMI_D7 */ + bias-disable; + }; + }; + + dcmi_sleep_pins_b: dcmi-sleep-1 { + pins { + pinmux = ,/* DCMI_HSYNC */ + ,/* DCMI_VSYNC */ + ,/* DCMI_PIXCLK */ + ,/* DCMI_D0 */ + ,/* DCMI_D1 */ + ,/* DCMI_D2 */ + ,/* DCMI_D3 */ + ,/* DCMI_D4 */ + ,/* DCMI_D5 */ + ,/* DCMI_D6 */ + ;/* DCMI_D7 */ + }; + }; + + ltdc_pins_c: ltdc-c-0 { + pins { + pinmux = , /* LCD_CLK */ + , /* LCD_HSYNC */ + , /* LCD_VSYNC */ + , /* LCD_DE */ + , /* LCD_R0 */ + , /* LCD_R1 */ + , /* LCD_R2 */ + , /* LCD_R3 */ + , /* LCD_R4 */ + , /* LCD_R5 */ + , /* LCD_R6 */ + , /* LCD_R7 */ + , /* LCD_G0 */ + , /* LCD_G1 */ + , /* LCD_G2 */ + , /* LCD_G3 */ + , /* LCD_G4 */ + , /* LCD_G5 */ + , /* LCD_G6 */ + , /* LCD_G7 */ + , /* LCD_B0 */ + , /* LCD_B1 */ + , /* LCD_B2 */ + , /* LCD_B3 */ + , /* LCD_B4 */ + , /* LCD_B5 */ + , /* LCD_B6 */ + ; /* LCD_B7 */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + }; + + ltdc_pins_sleep_c: ltdc-c-1 { + pins { + pinmux = , /* LCD_CLK */ + , /* LCD_HSYNC */ + , /* LCD_VSYNC */ + , /* LCD_DE */ + , /* LCD_R0 */ + , /* LCD_R1 */ + , /* LCD_R2 */ + , /* LCD_R3 */ + , /* LCD_R4 */ + , /* LCD_R5 */ + , /* LCD_R6 */ + , /* LCD_R7 */ + , /* LCD_G0 */ + , /* LCD_G1 */ + , /* LCD_G2 */ + , /* LCD_G3 */ + , /* LCD_G4 */ + , /* LCD_G5 */ + , /* LCD_G6 */ + , /* LCD_G7 */ + , /* LCD_B0 */ + , /* LCD_B1 */ + , /* LCD_B2 */ + , /* LCD_B3 */ + , /* LCD_B4 */ + , /* LCD_B5 */ + , /* LCD_B6 */ + ; /* LCD_B7 */ + }; + }; + + uart8_pins_a: uart8-0 { + pins1 { + pinmux = ; /* UART8_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* UART8_RX */ + bias-disable; + }; + }; + + uart8_idle_pins_a: uart8-idle-0 { + pins1 { + pinmux = ; /* UART8_TX */ + }; + pins2 { + pinmux = ; /* UART8_RX */ + bias-disable; + }; + }; + + uart8_sleep_pins_a: uart8-sleep-0 { + pins { + pinmux = , /* UART8_TX */ + ; /* UART8_RX */ + }; + }; + + m_can1_pins_b: m-can1-b-0 { + pins1 { + pinmux = ; /* CAN1_TX */ + slew-rate = <0>; + drive-push-pull; + bias-disable; + }; + pins2 { + pinmux = ; /* CAN1_RX */ + bias-disable; + }; + }; + + m_can1_sleep_pins_b: m_can1-b-sleep@0 { + pins { + pinmux = , /* CAN1_TX */ + ; /* CAN1_RX */ + }; + }; + + m_can2_pins_a: m-can2-0 { + pins1 { + pinmux = ; /* CAN2_TX */ + slew-rate = <0>; + drive-push-pull; + bias-disable; + }; + pins2 { + pinmux = ; /* CAN2_RX */ + bias-disable; + }; + }; + + m_can2_sleep_pins_a: m_can2-sleep@0 { + pins { + pinmux = , /* CAN2_TX */ + ; /* CAN2_RX */ + }; + }; + + usart3_pins_c: usart3-2 { + pins1 { + pinmux = , /* USART3_TX */ + ; /* USART3_RTS */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = , /* USART3_RX */ + ; /* USART3_CTS_NSS */ + bias-disable; + }; + }; + + usart3_idle_pins_c: usart3-idle-2 { + pins1 { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + ; /* USART3_CTS_NSS */ + }; + pins2 { + pinmux = ; /* USART3_RX */ + bias-disable; + }; + }; + + usart3_sleep_pins_c: usart3-sleep-2 { + pins { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + , /* USART3_CTS_NSS */ + ; /* USART3_RX */ + }; + }; + + usart6_pins_a: usart6-a-1 { + pins1 { + pinmux = ; /* USART6_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART6_RX */ + bias-disable; + }; + }; + + usart6_idle_pins_a: usart6-idle-a-2 { + pins1 { + pinmux = ; /* USART6_TX */ + }; + pins2 { + pinmux = ; /* USART6_RX */ + bias-disable; + }; + }; + + usart6_sleep_pins_a: usart6-sleep-a-2 { + pins { + pinmux = , /* USART6_TX */ + ; /* USART6_RX */ + }; + }; + + + i2c1_pins_b: i2c1-b-0 { + pins { + pinmux = , /* I2C1_SCL */ + ; /* I2C1_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + i2c1_pins_sleep_b: i2c1-b-1 { + pins { + pinmux = , /* I2C1_SCL */ + ; /* I2C1_SDA */ + }; + }; + + spi2_pins_a: spi2-0 { + pins1 { + pinmux = , /* SPI2_SCK */ + ; /* SPI2_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + + pins2 { + pinmux = ; /* SPI2_MISO */ + bias-disable; + }; + }; + + spi2_sleep_pins_a: spi2-sleep-0 { + pins { + pinmux = , /* SPI2_SCK */ + , /* SPI2_MISO */ + ; /* SPI2_MOSI */ + }; + }; + + bt_reg: bt_reg_on-1 { + pins { + pinmux = ; + drive-push-pull; + bias-pull-up; + output-high; + slew-rate = <0>; + }; + }; +}; + +&pinctrl_z { + usart1_pins_a: usart1-0 { + pins1 { + pinmux = ; /* USART1_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_idle_pins_a: usart1-idle-0 { + pins1 { + pinmux = ; /* USART1_TX */ + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_sleep_pins_a: usart1-sleep-0 { + pins { + pinmux = , /* USART1_TX */ + ; /* USART1_RX */ + }; + }; + + i2c6_pins_a: i2c6-0 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + i2c6_pins_sleep_a: i2c6-1 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + }; + }; + + spi6_pins_a: spi6-0 { + pins1 { + pinmux = , /* SPI4_SCK */ + ; /* SPI4_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + + pins2 { + pinmux = ; /* SPI4_MISO */ + bias-disable; + }; + }; + + spi6_sleep_pins_a: spi6-sleep-0 { + pins { + pinmux = , /* SPI4_SCK */ + , /* SPI4_MISO */ + ; /* SPI4_MOSI */ + }; + }; }; &cec { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&cec_pins_a>; - pinctrl-1 = <&cec_pins_sleep_a>; status = "disabled"; }; @@ -335,8 +727,12 @@ #address-cells = <1>; #size-cells = <0>; compatible = "snps,dwmac-mdio"; - phy0: ethernet-phy@0 { - reg = <0>; + phy0: ethernet-phy@7 { + reg = <7>; + rxc-skew-ps = <1200>; + rxdv-skew-ps = <700>; + txc-skew-ps = <1200>; + txen-skew-ps = <700>; }; }; }; @@ -346,46 +742,56 @@ status = "okay"; }; -&i2c2 { +&i2c1 { pinctrl-names = "default", "sleep"; - pinctrl-0 = <&i2c2_pins_a>; - pinctrl-1 = <&i2c2_pins_sleep_a>; + pinctrl-0 = <&i2c1_pins_b>; + pinctrl-1 = <&i2c1_pins_sleep_b>; i2c-scl-rising-time-ns = <100>; i2c-scl-falling-time-ns = <7>; status = "okay"; /delete-property/dmas; /delete-property/dma-names; -/* - tsc2007: tsc2007@48 { - compatible = "ti,tsc2007"; - reg = <0x48>; - interrupt-parent = <&gpioi>; - interrupts = <8 IRQ_TYPE_EDGE_FALLING>; - interrupt-controller; - gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; - ti,x-plate-ohms = <660>; - }; -*/ - ft5x06: ft5x06@38 { - compatible = "edt,edt-ft5306"; - reg = <0x38>; - interrupts = <7 IRQ_TYPE_EDGE_FALLING>; - interrupt-parent = <&gpiog>; - interrupt-controller; - reset-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; + wm8904_codec: wm8904@1a { + compatible = "wlf,wm8904"; + #sound-dai-cells = <0>; + reg = <0x1a>; status = "okay"; - }; - gt9147@5d { - compatible = "goodix,gt9147"; - reg = <0x5d>; - pinctrl-names = "default"; - pinctrl-0 = <>9147_irq>; - irq-gpios = <&gpiog 7 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; - status = "okay"; + clocks = <&sai2a>; + clock-names = "mclk"; + + wm8904_port: port { + #address-cells = <1>; + #size-cells = <0>; + + wm8904_tx_endpoint: endpoint@0 { + reg = <0>; + remote-endpoint = <&sai2a_endpoint>; + frame-master; + bitclock-master; + }; + + wm8904_rx_endpoint: endpoint@1 { + reg = <1>; + remote-endpoint = <&sai2b_endpoint>; + frame-master; + bitclock-master; + }; + }; + }; +}; + +&i2c6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c6_pins_a>; + pinctrl-1 = <&i2c6_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; }; @@ -399,6 +805,30 @@ /delete-property/dmas; /delete-property/dma-names; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + clocks = <&clk_ext_camera>; + clock-names = "xclk"; + DOVDD-supply = <&v2v8>; + powerdown-gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; + rotation = <180>; + status = "okay"; + + port { + ov5640_0: endpoint { + remote-endpoint = <&dcmi_0>; + bus-width = <8>; + data-shift = <2>; /* lines 9:2 are used */ + hsync-active = <0>; + vsync-active = <0>; + pclk-sample = <1>; + pclk-max-frequency = <77000000>; + }; + }; + }; }; &i2s2 { @@ -407,7 +837,7 @@ pinctrl-names = "default", "sleep"; pinctrl-0 = <&i2s2_pins_b>; pinctrl-1 = <&i2s2_pins_sleep_b>; - status = "disabled"; + status = "okay"; }; &ipcc { @@ -426,8 +856,8 @@ #address-cells = <1>; #size-cells = <0>; - ltdc_out_rgb: endpoint@0 { - reg = <0>; + ltdc_out_rgb: endpoint@1 { + reg = <1>; remote-endpoint = <&panel_in_rgb>; }; }; @@ -463,7 +893,43 @@ pinctrl-names = "default", "sleep"; pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>; pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>; - status = "disabled"; + status = "okay"; + + sai2a: audio-controller@4400b004 { + #clock-cells = <0>; + dma-names = "tx"; + clocks = <&rcc SAI2_K>; + clock-names = "sai_ck"; + status = "okay"; + + sai2a_port: port { + sai2a_endpoint: endpoint { + remote-endpoint = <&wm8904_tx_endpoint>; + format = "i2s"; + mclk-fs = <256>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <16>; + }; + }; + }; + + sai2b: audio-controller@4400b024 { + dma-names = "rx"; + st,sync = <&sai2a 2>; + clocks = <&rcc SAI2_K>, <&sai2a>; + clock-names = "sai_ck", "MCLK"; + status = "okay"; + + sai2b_port: port { + sai2b_endpoint: endpoint { + remote-endpoint = <&wm8904_rx_endpoint>; + format = "i2s"; + mclk-fs = <256>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <16>; + }; + }; + }; }; &sdmmc1 { @@ -478,6 +944,7 @@ status = "okay"; }; +/* emmc */ &sdmmc2 { pinctrl-names = "default", "opendrain", "sleep"; pinctrl-0 = <&sdmmc2_b4_pins_b &sdmmc2_d47_pins_a>; @@ -488,21 +955,38 @@ bus-width = <8>; vmmc-supply = <&v3v3>; keep-power-in-suspend; - status = "disabled"; + status = "okay"; }; -&spi4 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&spi4_pins_a>; - pinctrl-1 = <&spi4_sleep_pins_a>; - status = "disabled"; +/* WiFi module */ +&sdmmc3 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc3_b4_pins_a>; + pinctrl-1 = <&sdmmc3_b4_od_pins_a>; + pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + st,neg-edge; + #address-cells = <1>; + #size-cells = <0>; + keep-power-in-suspend; + bus-width = <4>; + no-1-8-v; + status = "okay"; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; }; -&spi5 { +&spi2 { pinctrl-names = "default", "sleep"; - pinctrl-0 = <&spi5_pins_a>; - pinctrl-1 = <&spi5_sleep_pins_a>; - status = "disabled"; + pinctrl-0 = <&spi2_pins_a>; + pinctrl-1 = <&spi2_sleep_pins_a>; + status = "okay"; }; &timers2 { @@ -539,6 +1023,41 @@ status = "okay"; }; +&usart3 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart3_pins_c>; + pinctrl-1 = <&usart3_sleep_pins_c>; + pinctrl-2 = <&usart3_idle_pins_c>; + st,hw-flow-ctrl; + status = "okay"; + + bluetooth { + pinctrl-names = "default"; + pinctrl-0 = <&bt_reg>; + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; + }; + +}; + +&usart6 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart6_pins_a>; + pinctrl-1 = <&usart6_sleep_pins_a>; + pinctrl-2 = <&usart6_idle_pins_a>; + status = "okay"; +}; + + +&uart8 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&uart8_pins_a>; + pinctrl-1 = <&uart8_sleep_pins_a>; + pinctrl-2 = <&uart8_idle_pins_a>; + rs485de-gpios = <&gpioh 5 1>; + status = "okay"; +}; + &m_can1 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&m_can1_pins_a>; @@ -546,6 +1065,14 @@ status = "okay"; }; +/* conflict with uart5 */ +&m_can2 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&m_can2_pins_a>; + pinctrl-1 = <&m_can2_sleep_pins_a>; + status = "disabled"; +}; + &qspi { pinctrl-names = "default", "sleep"; pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>; @@ -565,6 +1092,32 @@ }; }; +&dcmi { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&dcmi_pins_b>; + pinctrl-1 = <&dcmi_sleep_pins_b>; + status = "okay"; + + port { + dcmi_0: endpoint { + remote-endpoint = <&ov5640_0>; + bus-width = <8>; + hsync-active = <0>; + vsync-active = <0>; + pclk-sample = <1>; + pclk-max-frequency = <77000000>; + }; + }; +}; + +&spi6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi6_pins_a>; + pinctrl-1 = <&spi6_sleep_pins_a>; + cs-gpios = <&gpioz 3 0>; + status = "okay"; +}; + &usbh_ehci { phys = <&usbphyc_port0>; phy-names = "usb"; From fd0574d29ba32bf70e03aed39599487e3c39ac5c Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 6 Apr 2020 23:19:14 +0800 Subject: [PATCH 34/54] sound:wm8904 enable MIC Detect --- sound/soc/codecs/wm8904.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 0661188499f9f8..ad0f5a56e3176d 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -790,7 +790,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w, snd_soc_component_write(component, WM8904_DC_SERVO_1, dcs_mask << WM8904_DCS_TRIG_STARTUP_0_SHIFT); - timeout = 500; + timeout = 50; } /* Wait for DC servo to complete */ @@ -1841,6 +1841,7 @@ static int wm8904_set_bias_level(struct snd_soc_component *component, ret = clk_prepare_enable(wm8904->mclk); if (ret) return ret; + snd_soc_component_update_bits(component, WM8904_MIC_BIAS_CONTROL_0, WM8904_MIC_DET_EINT, 0x01); break; case SND_SOC_BIAS_PREPARE: From d98984bb077ec459edf4da3069612e743a0fc985 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Mon, 6 Apr 2020 23:19:37 +0800 Subject: [PATCH 35/54] arm:dts change sound card name --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 2 +- arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index 0ab681062199a4..59b0093d6f8041 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -212,7 +212,7 @@ sound { compatible = "audio-graph-card"; - label = "wm8904-KenQue"; + label = "WM8904-i2CMP15XB"; mclk-fs = <256>; dai-format = "i2s"; simple-audio-card,widgets = diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts index 78d3e514045d75..dc512a287dbcda 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbn.dts @@ -208,7 +208,7 @@ sound { compatible = "audio-graph-card"; - label = "wm8904-KenQue"; + label = "WM8904-i2CMP15XB"; mclk-fs = <256>; dai-format = "i2s"; simple-audio-card,widgets = From 1b13db55fc0ac47f1e89a043b5b206bdd542d25c Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Tue, 14 Apr 2020 13:20:01 +0800 Subject: [PATCH 36/54] drivers:serial replace gpiod function --- drivers/tty/serial/stm32-usart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index ab92c51bf22f1c..fb7a108499f63f 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -173,7 +173,7 @@ static int stm32_init_rs485(struct uart_port *port, uart_get_rs485_mode(&pdev->dev, rs485conf); - stm32_ports->txen_gpio = devm_gpiod_get(&pdev->dev, "rs485de", GPIOD_OUT_LOW); + stm32_port->txen_gpio = devm_gpiod_get_optional(&pdev->dev, "rs485de", GPIOD_OUT_LOW); return 0; } From 010a13e939bec897a2f2ca68dbdd535197dea998 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Tue, 14 Apr 2020 16:19:46 +0800 Subject: [PATCH 37/54] dts:panguboard enable ADC peripher --- arch/arm/boot/dts/stm32mp157a-panguboard.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard.dts b/arch/arm/boot/dts/stm32mp157a-panguboard.dts index b0ab1b9374abd3..24c35174acf1ec 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard.dts @@ -762,5 +762,17 @@ regulator-min-microvolt = <2500000>; regulator-max-microvolt = <2500000>; vdda-supply = <&vdd>; + status = "disabled"; +}; + +&adc { + vdda-supply = <&vdd>; + vref-supply = <&vdd>; status = "okay"; + + adc1: adc@0 { + st,adc-channels = <0 1>; + st,min-sample-time-nsecs = <10000>; + status = "okay"; + }; }; From 9b1ef008c35825395e8a9f85ca70e694ee54d41e Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Tue, 14 Apr 2020 16:20:23 +0800 Subject: [PATCH 38/54] dts:i2cmp15xbe enable ADC periphery --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 25 ++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index 59b0093d6f8041..2daa14e770a4b8 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -11,6 +11,7 @@ #include "stm32mp157caa-pinctrl.dtsi" #include #include +#include / { model = "i2SOM i2C-MP15X-C Board"; @@ -647,6 +648,17 @@ }; }; +&adc { + vref-supply = <&vdd>; + status = "okay"; + + adc1: adc@0 { + st,adc-channels = <0 1>; + st,min-sample-time-nsecs = <10000>; + status = "okay"; + }; +}; + &cec { status = "disabled"; }; @@ -762,7 +774,7 @@ clock-names = "xclk"; DOVDD-supply = <&v2v8>; powerdown-gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; rotation = <180>; status = "okay"; @@ -824,6 +836,9 @@ }; &rtc { + st,lsco = ; + pinctrl-0 = <&rtc_out2_rmp_pins_a>; + pinctrl-names = "default"; status = "okay"; }; @@ -1066,6 +1081,12 @@ pinctrl-1 = <&spi6_sleep_pins_a>; cs-gpios = <&gpioz 3 0>; status = "okay"; + + spidev@0{ + compatible = "spidev"; + reg = <0>; + spi-max-frequency = <32000000>; + }; }; &usbh_ehci { @@ -1101,5 +1122,5 @@ regulator-min-microvolt = <2500000>; regulator-max-microvolt = <2500000>; vdda-supply = <&vdd>; - status = "okay"; + status = "disabled"; }; From 6653374080436f27be2ba505e276e06739ff0fd0 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 17 Apr 2020 16:42:45 +0800 Subject: [PATCH 39/54] arm:dts add i2m-giantaxe as commont file --- .../stm32mp157a-panguboard-hdmi-giantaxe.dts | 272 +-------------- .../stm32mp157a-panguboard-i2m-giantaxe.dtsi | 281 +++++++++++++++ ...mp157a-panguboard-lcd043p800c-giantaxe.dts | 253 +------------- ...p157a-panguboard-lcd070p1024c-giantaxe.dts | 253 +------------- .../stm32mp157a-panguboard-mipi-giantaxe.dts | 326 +----------------- 5 files changed, 288 insertions(+), 1097 deletions(-) create mode 100644 arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts index 49e8507a257431..1754720bca9467 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-hdmi-giantaxe.dts @@ -7,279 +7,9 @@ /dts-v1/; #include "stm32mp157a-panguboard.dts" +#include "stm32mp157a-panguboard-i2m-giantaxe.dtsi" / { model = "i2SOM PanGu Board and GiantAxe"; compatible = "i2som,panguboard", "st,stm32mp157"; - - aliases { - serial0 = &uart4; - serial3 = &usart1; - serial1 = &usart2; - serial2 = &usart3; - serial4 = &uart5; - }; - - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; - }; - -}; - -&pinctrl { - - usart3_pins_c: usart3-2 { - pins1 { - pinmux = , /* USART3_TX */ - ; /* USART3_RTS */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = , /* USART3_RX */ - ; /* USART3_CTS_NSS */ - bias-disable; - }; - }; - - usart3_idle_pins_c: usart3-idle-2 { - pins1 { - pinmux = , /* USART3_TX */ - , /* USART3_RTS */ - ; /* USART3_CTS_NSS */ - }; - pins2 { - pinmux = ; /* USART3_RX */ - bias-disable; - }; - }; - - usart3_sleep_pins_c: usart3-sleep-2 { - pins { - pinmux = , /* USART3_TX */ - , /* USART3_RTS */ - , /* USART3_CTS_NSS */ - ; /* USART3_RX */ - }; - }; - - bt_reg: bt_reg_on-1 { - pins { - pinmux = ; - drive-push-pull; - bias-pull-up; - output-high; - slew-rate = <0>; - }; - }; - - usart2_pins_b: usart2-b-0 { - pins1 { - pinmux = ; /* USART2_TX */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = ; /* USART2_RX */ - bias-disable; - }; - }; - - usart2_idle_pins_b: usart2-idle-b-0 { - pins1 { - pinmux = ; /* USART2_TX */ - }; - pins2 { - pinmux = ; /* USART2_RX */ - bias-disable; - }; - }; - - usart2_sleep_pins_b: usart2-sleep-b-0 { - pins { - pinmux = , /* USART2_TX */ - ; /* USART2_RX */ - }; - }; - - timer1_pins: pwm1-test-0 { - pins { - pinmux = , /* TIM1_CH1 */ - , /* TIM1_CH1N */ - , /* TIM1_CH2 */ - , /* TIM1_CH2N */ - , /* TIM1_CH3 */ - , /* TIM1_CH3N */ - ; /* TIM1_CH4 */ - bias-pull-down; - drive-push-pull; - slew-rate = <0>; - }; - }; -}; - -&pinctrl_z { - usart1_pins_a: usart1-0 { - pins1 { - pinmux = ; /* USART1_TX */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = ; /* USART1_RX */ - bias-disable; - }; - }; - - usart1_idle_pins_a: usart1-idle-0 { - pins1 { - pinmux = ; /* USART1_TX */ - }; - pins2 { - pinmux = ; /* USART1_RX */ - bias-disable; - }; - }; - - usart1_sleep_pins_a: usart1-sleep-0 { - pins { - pinmux = , /* USART1_TX */ - ; /* USART1_RX */ - }; - }; - - i2c6_pins_a: i2c6-0 { - pins { - pinmux = , /* I2C6_SCL */ - ; /* I2C6_SDA */ - bias-disable; - drive-open-drain; - slew-rate = <0>; - }; - }; - - i2c6_pins_sleep_a: i2c6-1 { - pins { - pinmux = , /* I2C6_SCL */ - ; /* I2C6_SDA */ - }; - }; - - spi6_pins_a: spi6-0 { - pins1 { - pinmux = , /* SPI4_SCK */ - ; /* SPI4_MOSI */ - bias-disable; - drive-push-pull; - slew-rate = <1>; - }; - - pins2 { - pinmux = ; /* SPI4_MISO */ - bias-disable; - }; - }; - - spi6_sleep_pins_a: spi6-sleep-0 { - pins { - pinmux = , /* SPI4_SCK */ - , /* SPI4_MISO */ - ; /* SPI4_MOSI */ - }; - }; -}; - -&timers1 { - status = "disabled"; -}; - -&m4_timers1 { - pinctrl-names = "rproc_default"; - pinctrl-0 = <&timer1_pins>; - status = "okay"; -}; - -&i2c6 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&i2c6_pins_a>; - pinctrl-1 = <&i2c6_pins_sleep_a>; - i2c-scl-rising-time-ns = <100>; - i2c-scl-falling-time-ns = <7>; - status = "okay"; - /delete-property/dmas; - /delete-property/dma-names; - -}; - -&usart1 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart1_pins_a>; - pinctrl-1 = <&usart1_sleep_pins_a>; - pinctrl-2 = <&usart1_idle_pins_a>; - status = "okay"; -}; - -&usart2 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart2_pins_b>; - pinctrl-1 = <&usart2_sleep_pins_b>; - pinctrl-2 = <&usart2_idle_pins_b>; - status = "okay"; -}; - -&usart3 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart3_pins_c>; - pinctrl-1 = <&usart3_sleep_pins_c>; - pinctrl-2 = <&usart3_idle_pins_c>; - st,hw-flow-ctrl; - status = "okay"; - - bluetooth { - pinctrl-names = "default"; - pinctrl-0 = <&bt_reg>; - compatible = "brcm,bcm43438-bt"; - max-speed = <3000000>; - }; - -}; - -&uart5 { - rs485de-gpios = <&gpiog 9 1>; -}; - -&spi6 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&spi6_pins_a>; - pinctrl-1 = <&spi6_sleep_pins_a>; - cs-gpios = <&gpioz 3 0>; - status = "okay"; -}; - -/* WiFi module */ -&sdmmc3 { - arm,primecell-periphid = <0x10153180>; - pinctrl-names = "default", "opendrain", "sleep"; - pinctrl-0 = <&sdmmc3_b4_pins_a>; - pinctrl-1 = <&sdmmc3_b4_od_pins_a>; - pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; - vmmc-supply = <&v3v3>; - mmc-pwrseq = <&wifi_pwrseq>; - non-removable; - st,neg-edge; - #address-cells = <1>; - #size-cells = <0>; - keep-power-in-suspend; - bus-width = <4>; - no-1-8-v; - status = "okay"; - - brcmf: bcrmf@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - }; }; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi b/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi new file mode 100644 index 00000000000000..3ea5746e6e6b68 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi @@ -0,0 +1,281 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) STMicroelectronics 2018 - All Rights Reserved + * Author: Alexandre Torgue . + */ + +/ { + model = "i2SOM PanGu Board and GiantAxe"; + compatible = "i2som,panguboard", "st,stm32mp157"; + + aliases { + serial0 = &uart4; + serial3 = &usart1; + serial1 = &usart2; + serial2 = &usart3; + serial4 = &uart5; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; + }; + +}; + +&pinctrl { + + usart3_pins_c: usart3-2 { + pins1 { + pinmux = , /* USART3_TX */ + ; /* USART3_RTS */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = , /* USART3_RX */ + ; /* USART3_CTS_NSS */ + bias-disable; + }; + }; + + usart3_idle_pins_c: usart3-idle-2 { + pins1 { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + ; /* USART3_CTS_NSS */ + }; + pins2 { + pinmux = ; /* USART3_RX */ + bias-disable; + }; + }; + + usart3_sleep_pins_c: usart3-sleep-2 { + pins { + pinmux = , /* USART3_TX */ + , /* USART3_RTS */ + , /* USART3_CTS_NSS */ + ; /* USART3_RX */ + }; + }; + + bt_reg: bt_reg_on-1 { + pins { + pinmux = ; + drive-push-pull; + bias-pull-up; + output-high; + slew-rate = <0>; + }; + }; + + usart2_pins_b: usart2-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_idle_pins_b: usart2-idle-b-0 { + pins1 { + pinmux = ; /* USART2_TX */ + }; + pins2 { + pinmux = ; /* USART2_RX */ + bias-disable; + }; + }; + + usart2_sleep_pins_b: usart2-sleep-b-0 { + pins { + pinmux = , /* USART2_TX */ + ; /* USART2_RX */ + }; + }; + + timer1_pins: pwm1-test-0 { + pins { + pinmux = , /* TIM1_CH1 */ + , /* TIM1_CH1N */ + , /* TIM1_CH2 */ + , /* TIM1_CH2N */ + , /* TIM1_CH3 */ + , /* TIM1_CH3N */ + ; /* TIM1_CH4 */ + bias-pull-down; + drive-push-pull; + slew-rate = <0>; + }; + }; +}; + +&pinctrl_z { + usart1_pins_a: usart1-0 { + pins1 { + pinmux = ; /* USART1_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_idle_pins_a: usart1-idle-0 { + pins1 { + pinmux = ; /* USART1_TX */ + }; + pins2 { + pinmux = ; /* USART1_RX */ + bias-disable; + }; + }; + + usart1_sleep_pins_a: usart1-sleep-0 { + pins { + pinmux = , /* USART1_TX */ + ; /* USART1_RX */ + }; + }; + + i2c6_pins_a: i2c6-0 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + i2c6_pins_sleep_a: i2c6-1 { + pins { + pinmux = , /* I2C6_SCL */ + ; /* I2C6_SDA */ + }; + }; + + spi6_pins_a: spi6-0 { + pins1 { + pinmux = , /* SPI4_SCK */ + ; /* SPI4_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + + pins2 { + pinmux = ; /* SPI4_MISO */ + bias-disable; + }; + }; + + spi6_sleep_pins_a: spi6-sleep-0 { + pins { + pinmux = , /* SPI4_SCK */ + , /* SPI4_MISO */ + ; /* SPI4_MOSI */ + }; + }; +}; + +&timers1 { + status = "disabled"; +}; + +&m4_timers1 { + pinctrl-names = "rproc_default"; + pinctrl-0 = <&timer1_pins>; + status = "okay"; +}; + +&i2c6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c6_pins_a>; + pinctrl-1 = <&i2c6_pins_sleep_a>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + +}; + +&usart1 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart1_pins_a>; + pinctrl-1 = <&usart1_sleep_pins_a>; + pinctrl-2 = <&usart1_idle_pins_a>; + status = "okay"; +}; + +&usart2 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart2_pins_b>; + pinctrl-1 = <&usart2_sleep_pins_b>; + pinctrl-2 = <&usart2_idle_pins_b>; + status = "okay"; +}; + +&usart3 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&usart3_pins_c>; + pinctrl-1 = <&usart3_sleep_pins_c>; + pinctrl-2 = <&usart3_idle_pins_c>; + st,hw-flow-ctrl; + status = "okay"; + + bluetooth { + pinctrl-names = "default"; + pinctrl-0 = <&bt_reg>; + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; + }; + +}; + +&uart5 { + rs485de-gpios = <&gpiog 9 1>; +}; + +&spi6 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi6_pins_a>; + pinctrl-1 = <&spi6_sleep_pins_a>; + cs-gpios = <&gpioz 3 0>; + status = "okay"; +}; + +/* WiFi module */ +&sdmmc3 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc3_b4_pins_a>; + pinctrl-1 = <&sdmmc3_b4_od_pins_a>; + pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + st,neg-edge; + #address-cells = <1>; + #size-cells = <0>; + keep-power-in-suspend; + bus-width = <4>; + no-1-8-v; + status = "okay"; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c-giantaxe.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c-giantaxe.dts index 75153a95d4acd9..300a104b679415 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c-giantaxe.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd043p800c-giantaxe.dts @@ -6,259 +6,10 @@ /dts-v1/; -#include "stm32mp157a-panguboard-lcd.dts" +#include "stm32mp157a-panguboard-lcd043p800c.dts" +#include "stm32mp157a-panguboard-i2m-giantaxe.dtsi" / { model = "i2SOM PanGu Board and GiantAxe"; compatible = "i2som,panguboard", "st,stm32mp157"; - - aliases { - serial0 = &uart4; - serial3 = &usart1; - serial1 = &usart2; - serial2 = &usart3; - serial4 = &uart5; - }; - - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; - }; -}; - -&panel_rgb { - compatible = "innolux,at070tn92"; -}; - -&pinctrl { - - usart3_pins_c: usart3-2 { - pins1 { - pinmux = , /* USART3_TX */ - ; /* USART3_RTS */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = , /* USART3_RX */ - ; /* USART3_CTS_NSS */ - bias-disable; - }; - }; - - usart3_idle_pins_c: usart3-idle-2 { - pins1 { - pinmux = , /* USART3_TX */ - , /* USART3_RTS */ - ; /* USART3_CTS_NSS */ - }; - pins2 { - pinmux = ; /* USART3_RX */ - bias-disable; - }; - }; - - usart3_sleep_pins_c: usart3-sleep-2 { - pins { - pinmux = , /* USART3_TX */ - , /* USART3_RTS */ - , /* USART3_CTS_NSS */ - ; /* USART3_RX */ - }; - }; - - bt_reg: bt_reg_on-1 { - pins { - pinmux = ; - drive-push-pull; - bias-pull-up; - output-high; - slew-rate = <0>; - }; - }; - - usart2_pins_b: usart2-b-0 { - pins1 { - pinmux = ; /* USART2_TX */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = ; /* USART2_RX */ - bias-disable; - }; - }; - - usart2_idle_pins_b: usart2-idle-b-0 { - pins1 { - pinmux = ; /* USART2_TX */ - }; - pins2 { - pinmux = ; /* USART2_RX */ - bias-disable; - }; - }; - - usart2_sleep_pins_b: usart2-sleep-b-0 { - pins { - pinmux = , /* USART2_TX */ - ; /* USART2_RX */ - }; - }; - -}; - -&pinctrl_z { - usart1_pins_a: usart1-0 { - pins1 { - pinmux = ; /* USART1_TX */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = ; /* USART1_RX */ - bias-disable; - }; - }; - - usart1_idle_pins_a: usart1-idle-0 { - pins1 { - pinmux = ; /* USART1_TX */ - }; - pins2 { - pinmux = ; /* USART1_RX */ - bias-disable; - }; - }; - - usart1_sleep_pins_a: usart1-sleep-0 { - pins { - pinmux = , /* USART1_TX */ - ; /* USART1_RX */ - }; - }; - - i2c6_pins_a: i2c6-0 { - pins { - pinmux = , /* I2C6_SCL */ - ; /* I2C6_SDA */ - bias-disable; - drive-open-drain; - slew-rate = <0>; - }; - }; - - i2c6_pins_sleep_a: i2c6-1 { - pins { - pinmux = , /* I2C6_SCL */ - ; /* I2C6_SDA */ - }; - }; - - spi6_pins_a: spi6-0 { - pins1 { - pinmux = , /* SPI4_SCK */ - ; /* SPI4_MOSI */ - bias-disable; - drive-push-pull; - slew-rate = <1>; - }; - - pins2 { - pinmux = ; /* SPI4_MISO */ - bias-disable; - }; - }; - - spi6_sleep_pins_a: spi6-sleep-0 { - pins { - pinmux = , /* SPI4_SCK */ - , /* SPI4_MISO */ - ; /* SPI4_MOSI */ - }; - }; -}; - -&i2c6 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&i2c6_pins_a>; - pinctrl-1 = <&i2c6_pins_sleep_a>; - i2c-scl-rising-time-ns = <100>; - i2c-scl-falling-time-ns = <7>; - status = "okay"; - /delete-property/dmas; - /delete-property/dma-names; - -}; - -&usart1 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart1_pins_a>; - pinctrl-1 = <&usart1_sleep_pins_a>; - pinctrl-2 = <&usart1_idle_pins_a>; - status = "okay"; -}; - -&usart2 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart2_pins_b>; - pinctrl-1 = <&usart2_sleep_pins_b>; - pinctrl-2 = <&usart2_idle_pins_b>; - status = "okay"; -}; - -&usart3 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart3_pins_c>; - pinctrl-1 = <&usart3_sleep_pins_c>; - pinctrl-2 = <&usart3_idle_pins_c>; - st,hw-flow-ctrl; - status = "okay"; - - bluetooth { - pinctrl-names = "default"; - pinctrl-0 = <&bt_reg>; - compatible = "brcm,bcm43438-bt"; - max-speed = <3000000>; - }; - -}; - -&uart5 { - rs485de-gpios = <&gpiog 9 1>; -}; - -&spi6 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&spi6_pins_a>; - pinctrl-1 = <&spi6_sleep_pins_a>; - cs-gpios = <&gpioz 3 0>; - status = "okay"; -}; - -/* WiFi module */ -&sdmmc3 { - arm,primecell-periphid = <0x10153180>; - pinctrl-names = "default", "opendrain", "sleep"; - pinctrl-0 = <&sdmmc3_b4_pins_a>; - pinctrl-1 = <&sdmmc3_b4_od_pins_a>; - pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; - vmmc-supply = <&v3v3>; - mmc-pwrseq = <&wifi_pwrseq>; - non-removable; - st,neg-edge; - #address-cells = <1>; - #size-cells = <0>; - keep-power-in-suspend; - bus-width = <4>; - no-1-8-v; - status = "okay"; - - brcmf: bcrmf@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - }; }; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c-giantaxe.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c-giantaxe.dts index b6511863a955b6..f94d8e14fc1112 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c-giantaxe.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-lcd070p1024c-giantaxe.dts @@ -6,259 +6,10 @@ /dts-v1/; -#include "stm32mp157a-panguboard-lcd.dts" +#include "stm32mp157a-panguboard-lcd070p1024c.dts" +#include "stm32mp157a-panguboard-i2m-giantaxe.dtsi" / { model = "i2SOM PanGu Board and GiantAxe"; compatible = "i2som,panguboard", "st,stm32mp157"; - - aliases { - serial0 = &uart4; - serial3 = &usart1; - serial1 = &usart2; - serial2 = &usart3; - serial4 = &uart5; - }; - - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; - }; -}; - -&panel_rgb { - compatible = "innolux,zj070na-01p"; -}; - -&pinctrl { - - usart3_pins_c: usart3-2 { - pins1 { - pinmux = , /* USART3_TX */ - ; /* USART3_RTS */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = , /* USART3_RX */ - ; /* USART3_CTS_NSS */ - bias-disable; - }; - }; - - usart3_idle_pins_c: usart3-idle-2 { - pins1 { - pinmux = , /* USART3_TX */ - , /* USART3_RTS */ - ; /* USART3_CTS_NSS */ - }; - pins2 { - pinmux = ; /* USART3_RX */ - bias-disable; - }; - }; - - usart3_sleep_pins_c: usart3-sleep-2 { - pins { - pinmux = , /* USART3_TX */ - , /* USART3_RTS */ - , /* USART3_CTS_NSS */ - ; /* USART3_RX */ - }; - }; - - bt_reg: bt_reg_on-1 { - pins { - pinmux = ; - drive-push-pull; - bias-pull-up; - output-high; - slew-rate = <0>; - }; - }; - - usart2_pins_b: usart2-b-0 { - pins1 { - pinmux = ; /* USART2_TX */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = ; /* USART2_RX */ - bias-disable; - }; - }; - - usart2_idle_pins_b: usart2-idle-b-0 { - pins1 { - pinmux = ; /* USART2_TX */ - }; - pins2 { - pinmux = ; /* USART2_RX */ - bias-disable; - }; - }; - - usart2_sleep_pins_b: usart2-sleep-b-0 { - pins { - pinmux = , /* USART2_TX */ - ; /* USART2_RX */ - }; - }; - -}; - -&pinctrl_z { - usart1_pins_a: usart1-0 { - pins1 { - pinmux = ; /* USART1_TX */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = ; /* USART1_RX */ - bias-disable; - }; - }; - - usart1_idle_pins_a: usart1-idle-0 { - pins1 { - pinmux = ; /* USART1_TX */ - }; - pins2 { - pinmux = ; /* USART1_RX */ - bias-disable; - }; - }; - - usart1_sleep_pins_a: usart1-sleep-0 { - pins { - pinmux = , /* USART1_TX */ - ; /* USART1_RX */ - }; - }; - - i2c6_pins_a: i2c6-0 { - pins { - pinmux = , /* I2C6_SCL */ - ; /* I2C6_SDA */ - bias-disable; - drive-open-drain; - slew-rate = <0>; - }; - }; - - i2c6_pins_sleep_a: i2c6-1 { - pins { - pinmux = , /* I2C6_SCL */ - ; /* I2C6_SDA */ - }; - }; - - spi6_pins_a: spi6-0 { - pins1 { - pinmux = , /* SPI4_SCK */ - ; /* SPI4_MOSI */ - bias-disable; - drive-push-pull; - slew-rate = <1>; - }; - - pins2 { - pinmux = ; /* SPI4_MISO */ - bias-disable; - }; - }; - - spi6_sleep_pins_a: spi6-sleep-0 { - pins { - pinmux = , /* SPI4_SCK */ - , /* SPI4_MISO */ - ; /* SPI4_MOSI */ - }; - }; -}; - -&i2c6 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&i2c6_pins_a>; - pinctrl-1 = <&i2c6_pins_sleep_a>; - i2c-scl-rising-time-ns = <100>; - i2c-scl-falling-time-ns = <7>; - status = "okay"; - /delete-property/dmas; - /delete-property/dma-names; - -}; - -&usart1 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart1_pins_a>; - pinctrl-1 = <&usart1_sleep_pins_a>; - pinctrl-2 = <&usart1_idle_pins_a>; - status = "okay"; -}; - -&usart2 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart2_pins_b>; - pinctrl-1 = <&usart2_sleep_pins_b>; - pinctrl-2 = <&usart2_idle_pins_b>; - status = "okay"; -}; - -&usart3 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart3_pins_c>; - pinctrl-1 = <&usart3_sleep_pins_c>; - pinctrl-2 = <&usart3_idle_pins_c>; - st,hw-flow-ctrl; - status = "okay"; - - bluetooth { - pinctrl-names = "default"; - pinctrl-0 = <&bt_reg>; - compatible = "brcm,bcm43438-bt"; - max-speed = <3000000>; - }; - -}; - -&uart5 { - rs485de-gpios = <&gpiog 9 1>; -}; - -&spi6 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&spi6_pins_a>; - pinctrl-1 = <&spi6_sleep_pins_a>; - cs-gpios = <&gpioz 3 0>; - status = "okay"; -}; - -/* WiFi module */ -&sdmmc3 { - arm,primecell-periphid = <0x10153180>; - pinctrl-names = "default", "opendrain", "sleep"; - pinctrl-0 = <&sdmmc3_b4_pins_a>; - pinctrl-1 = <&sdmmc3_b4_od_pins_a>; - pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; - vmmc-supply = <&v3v3>; - mmc-pwrseq = <&wifi_pwrseq>; - non-removable; - st,neg-edge; - #address-cells = <1>; - #size-cells = <0>; - keep-power-in-suspend; - bus-width = <4>; - no-1-8-v; - status = "okay"; - - brcmf: bcrmf@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - }; }; diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-mipi-giantaxe.dts b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi-giantaxe.dts index 636d6c48f13e3b..9bcc949a7d122f 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-mipi-giantaxe.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-mipi-giantaxe.dts @@ -6,332 +6,10 @@ /dts-v1/; -#include "stm32mp157a-panguboard.dts" -#include +#include "stm32mp157a-panguboard-mipi.dts" +#include "stm32mp157a-panguboard-i2m-giantaxe.dtsi" / { model = "i2SOM PanGu Board MIPI"; compatible = "i2som,pangu", "st,stm32mp157"; - - aliases { - serial0 = &uart4; - serial3 = &usart1; - serial1 = &usart2; - serial2 = &usart3; - serial4 = &uart5; - }; - - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; - }; -}; - -&dsi { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - dsi_in: endpoint { - remote-endpoint = <<dc_ep1_out>; - }; - }; - - port@1 { - reg = <1>; - dsi_out: endpoint { - remote-endpoint = <&panel_in>; - }; - }; - }; - - panel@0 { - compatible = "orisetech,otm8009a"; - reg = <0>; - reset-gpios = <&gpioc 7 GPIO_ACTIVE_LOW>; - status = "okay"; - - port { - panel_in: endpoint { - remote-endpoint = <&dsi_out>; - }; - }; - }; -}; - -&i2c2 { - touchscreen@2a { - compatible = "focaltech,ft6236"; - reg = <0x2a>; - interrupts = <13 2>; - interrupt-parent = <&gpioc>; - interrupt-controller; - touchscreen-size-x = <480>; - touchscreen-size-y = <800>; - status = "okay"; - }; - - touchscreen@38 { - compatible = "focaltech,ft6336"; - reg = <0x38>; - interrupts = <13 2>; - interrupt-parent = <&gpioc>; - interrupt-controller; - touchscreen-size-x = <480>; - touchscreen-size-y = <800>; - status = "okay"; - }; -}; - -<dc { - status = "okay"; - - port { - #address-cells = <1>; - #size-cells = <0>; - - ltdc_ep1_out: endpoint@1 { - reg = <1>; - remote-endpoint = <&dsi_in>; - }; - }; -}; - -&pinctrl { - - usart3_pins_c: usart3-2 { - pins1 { - pinmux = , /* USART3_TX */ - ; /* USART3_RTS */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = , /* USART3_RX */ - ; /* USART3_CTS_NSS */ - bias-disable; - }; - }; - - usart3_idle_pins_c: usart3-idle-2 { - pins1 { - pinmux = , /* USART3_TX */ - , /* USART3_RTS */ - ; /* USART3_CTS_NSS */ - }; - pins2 { - pinmux = ; /* USART3_RX */ - bias-disable; - }; - }; - - usart3_sleep_pins_c: usart3-sleep-2 { - pins { - pinmux = , /* USART3_TX */ - , /* USART3_RTS */ - , /* USART3_CTS_NSS */ - ; /* USART3_RX */ - }; - }; - - bt_reg: bt_reg_on-1 { - pins { - pinmux = ; - drive-push-pull; - bias-pull-up; - output-high; - slew-rate = <0>; - }; - }; - - usart2_pins_b: usart2-b-0 { - pins1 { - pinmux = ; /* USART2_TX */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = ; /* USART2_RX */ - bias-disable; - }; - }; - - usart2_idle_pins_b: usart2-idle-b-0 { - pins1 { - pinmux = ; /* USART2_TX */ - }; - pins2 { - pinmux = ; /* USART2_RX */ - bias-disable; - }; - }; - - usart2_sleep_pins_b: usart2-sleep-b-0 { - pins { - pinmux = , /* USART2_TX */ - ; /* USART2_RX */ - }; - }; - -}; - -&pinctrl_z { - usart1_pins_a: usart1-0 { - pins1 { - pinmux = ; /* USART1_TX */ - bias-disable; - drive-push-pull; - slew-rate = <0>; - }; - pins2 { - pinmux = ; /* USART1_RX */ - bias-disable; - }; - }; - - usart1_idle_pins_a: usart1-idle-0 { - pins1 { - pinmux = ; /* USART1_TX */ - }; - pins2 { - pinmux = ; /* USART1_RX */ - bias-disable; - }; - }; - - usart1_sleep_pins_a: usart1-sleep-0 { - pins { - pinmux = , /* USART1_TX */ - ; /* USART1_RX */ - }; - }; - - i2c6_pins_a: i2c6-0 { - pins { - pinmux = , /* I2C6_SCL */ - ; /* I2C6_SDA */ - bias-disable; - drive-open-drain; - slew-rate = <0>; - }; - }; - - i2c6_pins_sleep_a: i2c6-1 { - pins { - pinmux = , /* I2C6_SCL */ - ; /* I2C6_SDA */ - }; - }; - - spi6_pins_a: spi6-0 { - pins1 { - pinmux = , /* SPI4_SCK */ - ; /* SPI4_MOSI */ - bias-disable; - drive-push-pull; - slew-rate = <1>; - }; - - pins2 { - pinmux = ; /* SPI4_MISO */ - bias-disable; - }; - }; - - spi6_sleep_pins_a: spi6-sleep-0 { - pins { - pinmux = , /* SPI4_SCK */ - , /* SPI4_MISO */ - ; /* SPI4_MOSI */ - }; - }; -}; - -&i2c6 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&i2c6_pins_a>; - pinctrl-1 = <&i2c6_pins_sleep_a>; - i2c-scl-rising-time-ns = <100>; - i2c-scl-falling-time-ns = <7>; - status = "okay"; - /delete-property/dmas; - /delete-property/dma-names; - -}; - -&usart1 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart1_pins_a>; - pinctrl-1 = <&usart1_sleep_pins_a>; - pinctrl-2 = <&usart1_idle_pins_a>; - status = "okay"; -}; - -&usart2 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart2_pins_b>; - pinctrl-1 = <&usart2_sleep_pins_b>; - pinctrl-2 = <&usart2_idle_pins_b>; - status = "okay"; -}; - -&usart3 { - pinctrl-names = "default", "sleep", "idle"; - pinctrl-0 = <&usart3_pins_c>; - pinctrl-1 = <&usart3_sleep_pins_c>; - pinctrl-2 = <&usart3_idle_pins_c>; - st,hw-flow-ctrl; - status = "okay"; - - bluetooth { - pinctrl-names = "default"; - pinctrl-0 = <&bt_reg>; - compatible = "brcm,bcm43438-bt"; - max-speed = <3000000>; - }; - -}; - -&uart5 { - rs485de-gpios = <&gpiog 9 1>; -}; - -&spi6 { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&spi6_pins_a>; - pinctrl-1 = <&spi6_sleep_pins_a>; - cs-gpios = <&gpioz 3 0>; - status = "okay"; -}; - -/* WiFi module */ -&sdmmc3 { - arm,primecell-periphid = <0x10153180>; - pinctrl-names = "default", "opendrain", "sleep"; - pinctrl-0 = <&sdmmc3_b4_pins_a>; - pinctrl-1 = <&sdmmc3_b4_od_pins_a>; - pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; - vmmc-supply = <&v3v3>; - mmc-pwrseq = <&wifi_pwrseq>; - non-removable; - st,neg-edge; - #address-cells = <1>; - #size-cells = <0>; - keep-power-in-suspend; - bus-width = <4>; - no-1-8-v; - status = "okay"; - - brcmf: bcrmf@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - }; }; From 8b1432fafb1edef50677a24dc33c1f6779a3c4cb Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 17 Apr 2020 19:20:54 +0800 Subject: [PATCH 40/54] arm:dts add dts for i2S-MP15X-D512E4 som --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 82 +--------------- .../boot/dts/stm32mp157a-i2smp15x-d512e4.dtsi | 96 +++++++++++++++++++ 2 files changed, 97 insertions(+), 81 deletions(-) create mode 100644 arch/arm/boot/dts/stm32mp157a-i2smp15x-d512e4.dtsi diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index 2daa14e770a4b8..dbe6b0a2e8b430 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -6,9 +6,7 @@ /dts-v1/; -#include "stm32mp157c.dtsi" -#include "stm32mp157c-m4-srm.dtsi" -#include "stm32mp157caa-pinctrl.dtsi" +#include "stm32mp157a-i2smp15x-d512e4.dtsi" #include #include #include @@ -31,70 +29,6 @@ stdout-path = "serial0:115200n8"; }; - memory@c0000000 { - reg = <0xc0000000 0x20000000>; - }; - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - retram: retram@0x38000000 { - compatible = "shared-dma-pool"; - reg = <0x38000000 0x10000>; - no-map; - }; - - mcuram: mcuram@0x30000000 { - compatible = "shared-dma-pool"; - reg = <0x30000000 0x40000>; - no-map; - }; - - mcuram2: mcuram2@0x10000000 { - compatible = "shared-dma-pool"; - reg = <0x10000000 0x40000>; - no-map; - }; - - vdev0vring0: vdev0vring0@10040000 { - compatible = "shared-dma-pool"; - reg = <0x10040000 0x2000>; - no-map; - }; - - vdev0vring1: vdev0vring1@10042000 { - compatible = "shared-dma-pool"; - reg = <0x10042000 0x2000>; - no-map; - }; - - vdev0buffer: vdev0buffer@10044000 { - compatible = "shared-dma-pool"; - reg = <0x10044000 0x4000>; - no-map; - }; - - gpu_reserved: gpu@dc000000 { - reg = <0xdc000000 0x4000000>; - no-map; - }; - }; - - sram: sram@10050000 { - compatible = "mmio-sram"; - reg = <0x10050000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 0x10050000 0x10000>; - - dma_pool: dma_pool@0 { - reg = <0x0 0x10000>; - pool; - }; - }; - clocks { clk_ext_camera: clk-ext-camera { #clock-cells = <0>; @@ -899,20 +833,6 @@ status = "okay"; }; -/* emmc */ -&sdmmc2 { - pinctrl-names = "default", "opendrain", "sleep"; - pinctrl-0 = <&sdmmc2_b4_pins_b &sdmmc2_d47_pins_a>; - pinctrl-1 = <&sdmmc2_b4_od_pins_b>; - pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>; - non-removable; - st,neg-edge; - bus-width = <8>; - vmmc-supply = <&v3v3>; - keep-power-in-suspend; - status = "okay"; -}; - /* WiFi module */ &sdmmc3 { arm,primecell-periphid = <0x10153180>; diff --git a/arch/arm/boot/dts/stm32mp157a-i2smp15x-d512e4.dtsi b/arch/arm/boot/dts/stm32mp157a-i2smp15x-d512e4.dtsi new file mode 100644 index 00000000000000..f04776f6ca8cb1 --- /dev/null +++ b/arch/arm/boot/dts/stm32mp157a-i2smp15x-d512e4.dtsi @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) i2SOM 2018 - All Rights Reserved + * Author: Steve Chen . + */ + +/dts-v1/; + +#include "stm32mp157c.dtsi" +#include "stm32mp157c-m4-srm.dtsi" +#include "stm32mp157caa-pinctrl.dtsi" + +/ { + model = "i2SOM i2S-MP15X-D512E4"; + compatible = "i2som,i2smp15xd512e4", "st,stm32mp157"; + + memory@c0000000 { + reg = <0xc0000000 0x20000000>; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + retram: retram@0x38000000 { + compatible = "shared-dma-pool"; + reg = <0x38000000 0x10000>; + no-map; + }; + + mcuram: mcuram@0x30000000 { + compatible = "shared-dma-pool"; + reg = <0x30000000 0x40000>; + no-map; + }; + + mcuram2: mcuram2@0x10000000 { + compatible = "shared-dma-pool"; + reg = <0x10000000 0x40000>; + no-map; + }; + + vdev0vring0: vdev0vring0@10040000 { + compatible = "shared-dma-pool"; + reg = <0x10040000 0x2000>; + no-map; + }; + + vdev0vring1: vdev0vring1@10042000 { + compatible = "shared-dma-pool"; + reg = <0x10042000 0x2000>; + no-map; + }; + + vdev0buffer: vdev0buffer@10044000 { + compatible = "shared-dma-pool"; + reg = <0x10044000 0x4000>; + no-map; + }; + + gpu_reserved: gpu@dc000000 { + reg = <0xdc000000 0x4000000>; + no-map; + }; + }; + + sram: sram@10050000 { + compatible = "mmio-sram"; + reg = <0x10050000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x10050000 0x10000>; + + dma_pool: dma_pool@0 { + reg = <0x0 0x10000>; + pool; + }; + }; + +}; + +/* emmc */ +&sdmmc2 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_b &sdmmc2_d47_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_b>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <8>; + vmmc-supply = <&v3v3>; + keep-power-in-suspend; + status = "okay"; +}; + From b13ff13927c2abab7ee3535c8858c7000c354f76 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Tue, 21 Apr 2020 22:21:59 +0800 Subject: [PATCH 41/54] arm:dts:i2cmp15xbe use internal 125Mhz as reference --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 41 ++++++++++++++++++-- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index dbe6b0a2e8b430..1ba4bfbb9a3c09 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -613,9 +613,25 @@ pinctrl-0 = <ðernet0_rgmii_pins_a>; pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>; pinctrl-names = "default", "sleep"; + clock-names = "stmmaceth", + "mac-clk-tx", + "mac-clk-rx", + "ethstp", + "syscfg-clk", + "eth-ck"; + clocks = <&rcc ETHMAC>, + <&rcc ETHTX>, + <&rcc ETHRX>, + <&rcc ETHSTP>, + <&rcc SYSCFG>, + <&rcc ETHCK_K>; + assigned-clocks = <&rcc ETHCK_K>; + assigned-clock-parents = <&rcc PLL4_P>; + assigned-clock-rates = <125000000>; phy-mode = "rgmii"; max-speed = <1000>; phy-handle = <&phy0>; + st,eth_clk_sel; status = "okay"; mdio0 { @@ -624,10 +640,27 @@ compatible = "snps,dwmac-mdio"; phy0: ethernet-phy@7 { reg = <7>; - rxc-skew-ps = <1200>; - rxdv-skew-ps = <700>; - txc-skew-ps = <1200>; - txen-skew-ps = <700>; + /* REG 0x0008, 5 bits per skew */ + txc-skew-ps = <1800>;/* 900ps */ + rxc-skew-ps = <1320>;/* 420ps */ + + /* REG 0x0004, 4 bits per skew */ + txen-skew-ps = <420>; /* 0ps */ + rxdv-skew-ps = <420>; /* 0ps */ + + /* REG 0x0005, 4 bits per skew */ + rxd0-skew-ps = <780>; /* 300ps */ + rxd1-skew-ps = <780>; /* 360ps */ + rxd2-skew-ps = <840>; /* 420ps */ + rxd3-skew-ps = <900>; /* 480ps */ + + /* REG 0x0006, 4 bits per skew */ + txd0-skew-ps = <0>; /* -420ps */ + txd1-skew-ps = <60>; /* -360ps */ + txd2-skew-ps = <120>; /* -300ps */ + txd3-skew-ps = <180>; /* -240ps */ + + micrel,force-master; }; }; }; From a02130f9927a6fcd5bf30af5013fd9f56fa5be01 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Tue, 21 Apr 2020 22:24:10 +0800 Subject: [PATCH 42/54] arm:dts:i2cmp15xbe avoid spidev driver warning info --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index 1ba4bfbb9a3c09..f2a89864840cd2 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -1036,7 +1036,7 @@ status = "okay"; spidev@0{ - compatible = "spidev"; + compatible = "rohm,dh2228fv", "spidev"; reg = <0>; spi-max-frequency = <32000000>; }; From 68db76685d3fda6f359b8eb31e6878edbf187e68 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Thu, 23 Apr 2020 00:48:00 +0800 Subject: [PATCH 43/54] arm:dts:i2cmp15xbe use gpio-i2c instead i2c The i2c controller of stm32mp1 has some bus busy issue. --- .../dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts | 2 +- .../dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts | 2 +- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 15 ++++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts index 762f5c66261a79..840304be431d3f 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd043p800c.dts @@ -12,7 +12,7 @@ compatible = "innolux,at070tn92"; }; -&i2c1 { +&gpio_i2c1 { gt9147@5d { compatible = "goodix,gt9147"; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts index 2e275a6b3a4592..692b370ec3261f 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-lcd070p1024c.dts @@ -22,7 +22,7 @@ compatible = "innolux,zj070na-01p"; }; -&i2c1 { +&gpio_i2c1 { ft5x06: ft5x06@38 { compatible = "edt,edt-ft5306"; diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index f2a89864840cd2..ba97d0aad2bfb8 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -120,6 +120,16 @@ reset-gpios = <&gpiof 2 GPIO_ACTIVE_LOW>; }; + gpio_i2c1: gpio-i2c1 { + compatible = "i2c-gpio"; + sda-gpios = <&gpiof 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpiof 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; /* ~100 kHz */ + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + }; + panel_backlight: panel-backlight { compatible = "pwm-backlight"; pwms = <&pwm2 3 500000>; @@ -676,9 +686,12 @@ pinctrl-1 = <&i2c1_pins_sleep_b>; i2c-scl-rising-time-ns = <100>; i2c-scl-falling-time-ns = <7>; - status = "okay"; + status = "disabled"; /delete-property/dmas; /delete-property/dma-names; +}; + +&gpio_i2c1 { wm8904_codec: wm8904@1a { compatible = "wlf,wm8904"; From a43175848fc1a28e1b55904f49fae2f493af943b Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Thu, 23 Apr 2020 00:48:55 +0800 Subject: [PATCH 44/54] arm:config enable gpio-i2c driver support --- arch/arm/configs/i2som_panguboard_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/i2som_panguboard_defconfig b/arch/arm/configs/i2som_panguboard_defconfig index 6af5c25556d415..0ec80db9065659 100644 --- a/arch/arm/configs/i2som_panguboard_defconfig +++ b/arch/arm/configs/i2som_panguboard_defconfig @@ -216,6 +216,7 @@ CONFIG_I2C_CHARDEV=y CONFIG_I2C_ARB_GPIO_CHALLENGE=m CONFIG_I2C_MUX_PINCTRL=y CONFIG_I2C_DEMUX_PINCTRL=y +CONFIG_I2C_GPIO=m CONFIG_I2C_STM32F7=y CONFIG_SPI=y CONFIG_SPI_BITBANG=y From 1d734a4eb2c2dfd431760e0734091dd810ca288a Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 24 Apr 2020 01:47:52 +0800 Subject: [PATCH 45/54] arm:dts remove gpio-led user1 --- arch/arm/boot/dts/stm32mp157a-panguboard.dts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard.dts b/arch/arm/boot/dts/stm32mp157a-panguboard.dts index 24c35174acf1ec..4d9af160798019 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard.dts +++ b/arch/arm/boot/dts/stm32mp157a-panguboard.dts @@ -106,13 +106,6 @@ linux,default-trigger = "heartbeat"; default-state = "on"; }; - - user1 { - label = "user1"; - gpios = <&gpioh 6 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; keys { From c442479bb4d7d7964144ed8d89590992e5989f7b Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 24 Apr 2020 12:07:55 +0800 Subject: [PATCH 46/54] arm:config enable mpu6050 driver support --- arch/arm/configs/i2som_panguboard_defconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/i2som_panguboard_defconfig b/arch/arm/configs/i2som_panguboard_defconfig index 0ec80db9065659..ec09e2b2f58ef6 100644 --- a/arch/arm/configs/i2som_panguboard_defconfig +++ b/arch/arm/configs/i2som_panguboard_defconfig @@ -216,7 +216,7 @@ CONFIG_I2C_CHARDEV=y CONFIG_I2C_ARB_GPIO_CHALLENGE=m CONFIG_I2C_MUX_PINCTRL=y CONFIG_I2C_DEMUX_PINCTRL=y -CONFIG_I2C_GPIO=m +CONFIG_I2C_GPIO=y CONFIG_I2C_STM32F7=y CONFIG_SPI=y CONFIG_SPI_BITBANG=y @@ -325,7 +325,6 @@ CONFIG_SND_SOC_CS42L42=y CONFIG_SND_SOC_CS42L51_I2C=y CONFIG_SND_SOC_SGTL5000=m CONFIG_SND_SOC_STI_SAS=m -CONFIG_SND_SOC_TLV320AIC23_I2C=m CONFIG_SND_SOC_WM8904=m CONFIG_SND_SIMPLE_CARD=m CONFIG_SND_SIMPLE_SCU_CARD=m @@ -444,6 +443,8 @@ CONFIG_STM32_DFSDM_ADC=y CONFIG_STM32_LPTIMER_CNT=y CONFIG_STM32_DAC=y CONFIG_MPU3050_I2C=y +CONFIG_INV_MPU6050_I2C=m +CONFIG_INV_MPU6050_SPI=m CONFIG_CM36651=m CONFIG_SENSORS_ISL29018=y CONFIG_SENSORS_ISL29028=y From 69f1a56bc009263be71f8a229d7b48b4bd61e932 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Fri, 24 Apr 2020 21:36:55 +0800 Subject: [PATCH 47/54] arm:config removed unused driver --- arch/arm/configs/i2som_panguboard_defconfig | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/arm/configs/i2som_panguboard_defconfig b/arch/arm/configs/i2som_panguboard_defconfig index ec09e2b2f58ef6..eda86a90da3293 100644 --- a/arch/arm/configs/i2som_panguboard_defconfig +++ b/arch/arm/configs/i2som_panguboard_defconfig @@ -255,7 +255,6 @@ CONFIG_BCMA_HOST_SOC=y CONFIG_BCMA_DRIVER_GMAC_CMN=y CONFIG_BCMA_DRIVER_GPIO=y CONFIG_MFD_STMPE=y -CONFIG_MFD_WM8994=y CONFIG_MFD_STM32_LPTIMER=y CONFIG_MFD_STPMIC1=y CONFIG_REGULATOR=y @@ -293,17 +292,10 @@ CONFIG_DRM_LOAD_EDID_FIRMWARE=y CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y CONFIG_DRM_PANEL_SIMPLE=y -CONFIG_DRM_PANEL_SAMSUNG_LD9040=m CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m -CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03=m -CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=m CONFIG_DRM_DUMB_VGA_DAC=m -CONFIG_DRM_NXP_PTN3460=m CONFIG_DRM_PARADE_PS8622=m CONFIG_DRM_SII902X=y -CONFIG_DRM_SII9234=m -CONFIG_DRM_I2C_ADV7511=m -CONFIG_DRM_I2C_ADV7511_AUDIO=y CONFIG_DRM_STI=m CONFIG_FB_ARMCLCD=y CONFIG_FB_SIMPLE=y @@ -423,7 +415,6 @@ CONFIG_STM32_DMAMUX=y CONFIG_STM32_MDMA=y CONFIG_DW_DMAC=y CONFIG_VIRTIO_MMIO=y -CONFIG_CHROME_PLATFORMS=y CONFIG_HWSPINLOCK=y CONFIG_HWSPINLOCK_STM32=y CONFIG_ARM_TIMER_SP804=y From 02cbc40cdd03d6aa6a1f623558be082602b759cb Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Tue, 28 Apr 2020 21:18:41 +0800 Subject: [PATCH 48/54] arm:dts update gpio_i2c1 for touch panel of mipi lcd --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts index 810fe731709038..609256014528a0 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe-mipi.dts @@ -52,7 +52,7 @@ }; }; -&i2c1 { +&gpio_i2c1 { touchscreen@2a { compatible = "focaltech,ft6236"; reg = <0x2a>; From 235e070f8629db5ffb9e47f4a8b51a0f6faac8e1 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Tue, 28 Apr 2020 21:19:09 +0800 Subject: [PATCH 49/54] sound:codec change debug level --- sound/soc/codecs/wm8904.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index ad0f5a56e3176d..e85632d62451c2 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -804,7 +804,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w, } while (--timeout); if ((val & dcs_mask) != dcs_mask) - dev_warn(component->dev, "DC servo timed out\n"); + dev_dbg(component->dev, "DC servo timed out\n"); else dev_dbg(component->dev, "DC servo ready\n"); From 1a1f32c9dd7705caca058d782e77f671fdbef8e3 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Wed, 29 Apr 2020 16:25:41 +0800 Subject: [PATCH 50/54] arm:dts setting 485 active high --- arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts index ba97d0aad2bfb8..1155eaefd137e6 100644 --- a/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts +++ b/arch/arm/boot/dts/stm32mp157a-i2cmp15xbe.dts @@ -949,7 +949,7 @@ pinctrl-0 = <&usart1_pins_a>; pinctrl-1 = <&usart1_sleep_pins_a>; pinctrl-2 = <&usart1_idle_pins_a>; - rs485de-gpios = <&gpiof 12 1>; + rs485de-gpios = <&gpiof 12 GPIO_ACTIVE_HIGH>; status = "okay"; }; @@ -984,7 +984,7 @@ pinctrl-0 = <&uart8_pins_a>; pinctrl-1 = <&uart8_sleep_pins_a>; pinctrl-2 = <&uart8_idle_pins_a>; - rs485de-gpios = <&gpioh 5 1>; + rs485de-gpios = <&gpioh 5 GPIO_ACTIVE_HIGH>; status = "okay"; }; From 44c0cc69d56774aec6628be08ae9dab9e14be97d Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Wed, 29 Apr 2020 16:26:12 +0800 Subject: [PATCH 51/54] serial:stm32 add 485 gpio operation --- drivers/tty/serial/stm32-usart.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index fb7a108499f63f..fd015ab97ddb99 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -595,6 +595,10 @@ static void stm32_start_tx(struct uart_port *port) } stm32_transmit_chars(port); + + if (stm32_port->txen_gpio) { + gpiod_set_value(stm32_port->txen_gpio, 0); + } } /* Flush the transmit buffer. */ @@ -933,6 +937,11 @@ static const char *stm32_type(struct uart_port *port) static void stm32_release_port(struct uart_port *port) { + struct stm32_port *stm32_port = to_stm32_port(port); + + if (stm32_port->txen_gpio) { + gpiod_set_value(stm32_port->txen_gpio, 0); + } } static int stm32_request_port(struct uart_port *port) From 7e183e2d9b423afa059b931ad063ec25529e3923 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 23 May 2020 10:10:05 +0800 Subject: [PATCH 52/54] arm:dts add power switch for WiFi and LTE module --- .../stm32mp157a-panguboard-i2m-giantaxe.dtsi | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi b/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi index 3ea5746e6e6b68..3fe9aad917415f 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi @@ -16,6 +16,32 @@ serial4 = &uart5; }; + lte_switch: regulator-lte-power { + compatible = "regulator-gpio"; + regulator-name = "lte_switch"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-type = "voltage"; + regulator-always-on; + + gpios = <&gpioe 1 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <1800000 0x0 3300000 0x1>; + }; + + wifi_switch: regulator-wifi-power { + compatible = "regulator-gpio"; + regulator-name = "wifi_switch"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-type = "voltage"; + regulator-always-on; + + gpios = <&gpiof 12 GPIO_ACTIVE_LOW>; + gpios-states = <0>; + states = <1800000 0x1 3300000 0x0>; + }; + wifi_pwrseq: wifi-pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; From a308785b982fdcdb60d566ad9f3226bac5844106 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 23 May 2020 10:30:00 +0800 Subject: [PATCH 53/54] arm:dts use macro flag for uart5(RS485) --- arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi b/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi index 3fe9aad917415f..8c7f407fd9b10b 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi @@ -271,7 +271,7 @@ }; &uart5 { - rs485de-gpios = <&gpiog 9 1>; + rs485de-gpios = <&gpiog 9 GPIO_ACTIVE_HIGH>; }; &spi6 { From 1553f8247f3c3ebeb4067039072b5fec160f8a95 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 23 May 2020 11:35:22 +0800 Subject: [PATCH 54/54] arm:dts change spi6 to spi1 for i2M-GiantAxe The spi6 is used for secure mode. --- arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi b/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi index 8c7f407fd9b10b..fc1a11a34690c7 100644 --- a/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi +++ b/arch/arm/boot/dts/stm32mp157a-panguboard-i2m-giantaxe.dtsi @@ -46,7 +46,6 @@ compatible = "mmc-pwrseq-simple"; reset-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; }; - }; &pinctrl { @@ -274,10 +273,10 @@ rs485de-gpios = <&gpiog 9 GPIO_ACTIVE_HIGH>; }; -&spi6 { +&spi1 { pinctrl-names = "default", "sleep"; - pinctrl-0 = <&spi6_pins_a>; - pinctrl-1 = <&spi6_sleep_pins_a>; + pinctrl-0 = <&spi1_pins_a>; + pinctrl-1 = <&spi1_sleep_pins_a>; cs-gpios = <&gpioz 3 0>; status = "okay"; };