add dts node for drm panel driver ili9341 add dts i2c3 for stmpe touch add dts spi5 for gyro & ili9341
Subsystems (5)
PATCH 1/4 add dts node for drm panel driver ili9341 add dts i2c3 for stmpe touch add dts spi5 for gyro & ili9341
From: dillon min <[email protected]>
--- .../bindings/display/panel/ilitek,ili9341.txt | 42 +++++++++++ arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 79 +++++++++++++++++++ arch/arm/boot/dts/stm32f429-disco.dts | 88 ++++++++++++++++++++++ arch/arm/boot/dts/stm32f429.dtsi | 12 +++ 4 files changed, 221 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +42 -0
@@ -0,0 +1,42 @@ +Ilitek ILI9341 TFT panel driver with SPI control bus + +This is a driver for 240x320 TFT panels, accepting a rgb input +streams that get adapted and scaled to the panel. + +Required properties: + - compatible: "stm32f429-disco,ltdc-panel", "ilitek,ili9341" + (full system-specific compatible is always required to look up configuration) + - reg: address of the panel on the SPI bus + +Optional properties: + - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt + - dc-gpios: a GPIO spec for the dc pin, see gpio/gpio.txt + + The following optional properties only apply to RGB input mode: + + - pixelclk-active: see display/panel/display-timing.txt + - de-active: see display/panel/display-timing.txt + - hsync-active: see display/panel/display-timing.txt + - vsync-active: see display/panel/display-timing.txt + +The panel must obey the rules for a SPI slave device as specified in +spi/spi-bus.txt + +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in +media/video-interfaces.txt. This node should describe panel's video bus. + +Example: + +panel: display@0 { + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; + reg = <0>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; +};
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +79 -0
85 lines not on this page · raw message
arch/arm/boot/dts/stm32f429-disco.dts +88 -0
103 lines not on this page · raw message
arch/arm/boot/dts/stm32f429.dtsi +12 -0
@@ -402,6 +402,18 @@ status = "disabled"; }; + i2c3: i2c@40005c00 { + compatible = "st,stm32f4-i2c"; + reg = <0x40005c00 0x400>; + interrupts = <72>, + <73>; + resets = <&rcc STM32F4_APB1_RESET(I2C3)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(I2C3)>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + dac: dac@40007400 { compatible = "st,stm32f4-dac-core"; reg = <0x40007400 0x400>;
Signature · 1 line
2.7.4
Hi
Quoted 3 lines · On 4/30/20 11:43 AM, [email protected] wrote:
From: dillon min <[email protected]>
Signed-off-by dillon min <[email protected]>
Commit title should be ARM: dts: stm32: bla bla on stm32f429 and please a commit message.
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt
Quoted 9 lines
--- .../bindings/display/panel/ilitek,ili9341.txt | 42 +++++++++++ arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 79 +++++++++++++++++++ arch/arm/boot/dts/stm32f429-disco.dts | 88 ++++++++++++++++++++++ arch/arm/boot/dts/stm32f429.dtsi | 12 +++ 4 files changed, 221 insertions(+)create mode 100644
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtDocumentation/devicetree/bindings/display/panel/ilitek,ili9341.txt +0
-0
This binding description should be in a separate patch and you have to write in YAML format.
Quoted 151 lines
new file mode 100644
index 0000000..f5a4e55Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +42
-0@@ -0,0 +1,42 @@ +Ilitek ILI9341 TFT panel driver with SPI control bus + +This is a driver for 240x320 TFT panels, accepting a rgb input +streams that get adapted and scaled to the panel. + +Required properties: + - compatible: "stm32f429-disco,ltdc-panel", "ilitek,ili9341" + (full system-specific compatible is always required to look up configuration) + - reg: address of the panel on the SPI bus + +Optional properties: + - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt + - dc-gpios: a GPIO spec for the dc pin, see gpio/gpio.txt + + The following optional properties only apply to RGB input mode: + + - pixelclk-active: see display/panel/display-timing.txt + - de-active: see display/panel/display-timing.txt + - hsync-active: see display/panel/display-timing.txt + - vsync-active: see display/panel/display-timing.txt + +The panel must obey the rules for a SPI slave device as specified in +spi/spi-bus.txt + +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in +media/video-interfaces.txt. This node should describe panel's video bus. + +Example: + +panel: display@0 { + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; + reg = <0>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; +};arch/arm/boot/dts/stm32f4-pinctrl.dtsi +79
-0@@ -316,6 +316,85 @@ }; }; + ltdc_pins_f429_disco: ltdc-1 { + pins { + pinmux = <STM32_PINMUX('C', 6, AF14)>, + /* LCD_HSYNC */ + <STM32_PINMUX('A', 4, AF14)>, + /* LCD_VSYNC */ + <STM32_PINMUX('G', 7, AF14)>, + /* LCD_CLK */ + <STM32_PINMUX('C', 10, AF14)>, + /* LCD_R2 */ + <STM32_PINMUX('B', 0, AF9)>, + /* LCD_R3 */ + <STM32_PINMUX('A', 11, AF14)>, + /* LCD_R4 */ + <STM32_PINMUX('A', 12, AF14)>, + /* LCD_R5 */ + <STM32_PINMUX('B', 1, AF9)>, + /* LCD_R6*/ + <STM32_PINMUX('G', 6, AF14)>, + /* LCD_R7 */ + <STM32_PINMUX('A', 6, AF14)>, + /* LCD_G2 */ + <STM32_PINMUX('G', 10, AF9)>, + /* LCD_G3 */ + <STM32_PINMUX('B', 10, AF14)>, + /* LCD_G4 */ + <STM32_PINMUX('D', 6, AF14)>, + /* LCD_B2 */ + <STM32_PINMUX('G', 11, AF14)>, + /* LCD_B3*/ + <STM32_PINMUX('B', 11, AF14)>, + /* LCD_G5 */ + <STM32_PINMUX('C', 7, AF14)>, + /* LCD_G6 */ + <STM32_PINMUX('D', 3, AF14)>, + /* LCD_G7 */ + <STM32_PINMUX('G', 12, AF9)>, + /* LCD_B4 */ + <STM32_PINMUX('A', 3, AF14)>, + /* LCD_B5 */ + <STM32_PINMUX('B', 8, AF14)>, + /* LCD_B6 */ + <STM32_PINMUX('B', 9, AF14)>, + /* LCD_B7 */ + <STM32_PINMUX('F', 10, AF14)>; + /* LCD_DE */ + slew-rate = <2>; + }; + }; + + i2c3_pins: i2c3-0 { + pins { + pinmux = <STM32_PINMUX('C', 9, AF4)>, + /* I2C3_SDA */ + <STM32_PINMUX('A', 8, AF4)>; + /* I2C3_SCL */ + bias-disable; + drive-open-drain; + slew-rate = <3>; + }; + }; + + spi5_pins: spi5-0 { + pins1 { + pinmux = <STM32_PINMUX('F', 7, AF5)>, + /* SPI5_CLK */ + <STM32_PINMUX('F', 9, AF5)>; + /* SPI5_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = <STM32_PINMUX('F', 8, AF5)>; + /* SPI5_MISO */ + bias-disable; + }; + }; + dcmi_pins: dcmi-0 { pins { pinmux = <STM32_PINMUX('A', 4, AF13)>, /* DCMI_HSYNC */arch/arm/boot/dts/stm32f429-disco.dts +2
-0@@ -49,6 +49,8 @@ #include "stm32f429.dtsi" #include "stm32f429-pinctrl.dtsi" #include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/gpio/gpio.h> / { model = "STMicroelectronics STM32F429i-DISCO board";
arch/arm/boot/dts/stm32f429-disco.dts line 104
Quoted 5 lines
arch/arm/boot/dts/stm32f429-disco.dts +2
-0@@ -98,6 +100,14 @@ regulator-name = "vcc5_host1"; regulator-always-on; }; + + reg_3p3v: regulator-3p3v {
3p3 ?
Quoted 54 lines
arch/arm/boot/dts/stm32f429-disco.dts +47
-0+ compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; }; &clk_hse {@@ -127,3 +137,81 @@ pinctrl-names = "default"; status = "okay"; }; + +<dc { + status = "okay"; + pinctrl-0 = <<dc_pins_f429_disco>; + pinctrl-names = "default"; + + port { + ltdc_out_rgb: endpoint { + remote-endpoint = <&panel_in_rgb>; + }; + }; +}; + +&spi5 { + status = "okay"; + pinctrl-0 = <&spi5_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>,<&gpioc 2 GPIO_ACTIVE_LOW>; + dmas = <&dma2 3 2 0x400 0x0>, + <&dma2 4 2 0x400 0x0>; + dma-names = "rx", "tx"; + l3gd20: l3gd20@0 { + compatible = "st,l3gd20-gyro"; + spi-max-frequency = <10000000>; + st,drdy-int-pin = <2>; + interrupt-parent = <&gpioa>; + interrupts = <1 IRQ_TYPE_EDGE_RISING>, + <2 IRQ_TYPE_EDGE_RISING>; + reg = <0>; + vddio = <®_3p3v>; + vdd = <®_3p3v>; + status = "okay"; + }; + display: display@1{ + /* Connect panel-ilitek-9341 to ltdc */ + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; + reg = <1>; + spi-3wire; + spi-max-frequency = <10000000>;
arch/arm/boot/dts/stm32f429-disco.dts line 190
Quoted 10 lines
arch/arm/boot/dts/stm32f429-disco.dts +10
-0+ dc-gpios = <&gpiod 13 0>; + port { + panel_in_rgb: endpoint { + remote-endpoint = <<dc_out_rgb>; + }; + }; + }; +}; + +&i2c3 {
Nodes are have to be ordered
arch/arm/boot/dts/stm32f429.dtsi
Quoted 32 lines
arch/arm/boot/dts/stm32f429-disco.dts +27
-0+ pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; + status = "okay"; + + touch: stmpe811@41 { + compatible = "st,stmpe811"; + reg = <0x41>; + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpioa>; + vio = <®_3p3v>; + vcc = <®_3p3v>; + status = "okay"; + + stmpe_touchscreen { + compatible = "st,stmpe-ts"; + st,sample-time = <4>; + st,mod-12b = <1>; + st,ref-sel = <0>; + st,adc-freq = <1>; + st,ave-ctrl = <1>; + st,touch-det-delay = <2>; + st,settling = <2>; + st,fraction-z = <7>; + st,i-drive = <1>; + }; + }; +};arch/arm/boot/dts/stm32f429.dtsi +0
-0@@ -402,6 +402,18 @@
Split Soc updates in a separate patch
Quoted 9 lines
arch/arm/boot/dts/stm32f429.dtsi +5
-0status = "disabled"; }; + i2c3: i2c@40005c00 { + compatible = "st,stm32f4-i2c"; + reg = <0x40005c00 0x400>; + interrupts = <72>, + <73>;
arch/arm/boot/dts/stm32f429.dtsi line 419
Quoted 10 lines
arch/arm/boot/dts/stm32f429.dtsi +7
-0+ resets = <&rcc STM32F4_APB1_RESET(I2C3)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(I2C3)>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + dac: dac@40007400 { compatible = "st,stm32f4-dac-core"; reg = <0x40007400 0x400>;
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Alexandre,
Quoted 11 lines · Alexandre Torgue <[email protected]> 于2020年4月30日周四 下午5:57写道:
Hi
Quoted 3 lines · On 4/30/20 11:43 AM, [email protected] wrote:
From: dillon min <[email protected]>
Signed-off-by dillon min <[email protected]>Commit title should be ARM: dts: stm32: bla bla on stm32f429 and please a commit message.
*okay, thanks for your quicky response, this is my first kernel pull request, i will resubmit all patchsets following the history submits style who was did.*
Quoted 200 lines
Quoted 3 lines
--- .../bindings/display/panel/ilitek,ili9341.txt | 42 +++++++++++ arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 79+++++++++++++++++++
Quoted 1 line
arch/arm/boot/dts/stm32f429-disco.dts | 88++++++++++++++++++++++
Quoted 3 lines
arch/arm/boot/dts/stm32f429.dtsi | 12 +++ 4 files changed, 221 insertions(+)create mode 100644
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtQuoted 2 lines
diff --git
a/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtb/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtThis binding description should be in a separate patch and you have to write in YAML format.
*okay, will do it later. *
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt line 8
Quoted 13 lines
new file mode 100644
index 0000000..f5a4e55Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +8
-0@@ -0,0 +1,42 @@ +Ilitek ILI9341 TFT panel driver with SPI control bus + +This is a driver for 240x320 TFT panels, accepting a rgb input +streams that get adapted and scaled to the panel. + +Required properties: + - compatible: "stm32f429-disco,ltdc-panel", "ilitek,ili9341" + (full system-specific compatible is always required to look upconfiguration)
Review
Quoted 35 lines
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +34
-0+ - reg: address of the panel on the SPI bus + +Optional properties: + - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt + - dc-gpios: a GPIO spec for the dc pin, see gpio/gpio.txt + + The following optional properties only apply to RGB input mode: + + - pixelclk-active: see display/panel/display-timing.txt + - de-active: see display/panel/display-timing.txt + - hsync-active: see display/panel/display-timing.txt + - vsync-active: see display/panel/display-timing.txt + +The panel must obey the rules for a SPI slave device as specified in +spi/spi-bus.txt + +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in +media/video-interfaces.txt. This node should describe panel's video bus. + +Example: + +panel: display@0 { + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; + reg = <0>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; +};(quoted diff) +0
-0
b/arch/arm/boot/dts/stm32f4-pinctrl.dtsiarch/arm/boot/dts/stm32f4-pinctrl.dtsi line 321
Quoted 10 lines
index 392fa14..45b68f4 100644
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +3
-0@@ -316,6 +316,85 @@ }; }; + ltdc_pins_f429_disco: ltdc-1 { + pins { + pinmux = <STM32_PINMUX('C', 6,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 323
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_HSYNC */ + <STM32_PINMUX('A', 4,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 325
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_VSYNC */ + <STM32_PINMUX('G', 7,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 327
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_CLK */ + <STM32_PINMUX('C', 10,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 329
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R2 */ + <STM32_PINMUX('B', 0,AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 331
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R3 */ + <STM32_PINMUX('A', 11,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 333
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R4 */ + <STM32_PINMUX('A', 12,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 335
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R5 */ + <STM32_PINMUX('B', 1,AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 337
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R6*/ + <STM32_PINMUX('G', 6,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 339
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R7 */ + <STM32_PINMUX('A', 6,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 341
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G2 */ + <STM32_PINMUX('G', 10,AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 343
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G3 */ + <STM32_PINMUX('B', 10,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 345
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G4 */ + <STM32_PINMUX('D', 6,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 347
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B2 */ + <STM32_PINMUX('G', 11,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 349
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B3*/ + <STM32_PINMUX('B', 11,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 351
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G5 */ + <STM32_PINMUX('C', 7,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 353
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G6 */ + <STM32_PINMUX('D', 3,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 355
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G7 */ + <STM32_PINMUX('G', 12,AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 357
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B4 */ + <STM32_PINMUX('A', 3,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 359
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B5 */ + <STM32_PINMUX('B', 8,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 361
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B6 */ + <STM32_PINMUX('B', 9,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 363
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B7 */ + <STM32_PINMUX('F', 10,AF14)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi
Quoted 8 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +8
-0+ /* LCD_DE */ + slew-rate = <2>; + }; + }; + + i2c3_pins: i2c3-0 { + pins { + pinmux = <STM32_PINMUX('C', 9,AF4)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 373
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* I2C3_SDA */ + <STM32_PINMUX('A', 8,AF4)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi
Quoted 10 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +10
-0+ /* I2C3_SCL */ + bias-disable; + drive-open-drain; + slew-rate = <3>; + }; + }; + + spi5_pins: spi5-0 { + pins1 { + pinmux = <STM32_PINMUX('F', 7,AF5)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi line 385
Quoted 2 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* SPI5_CLK */ + <STM32_PINMUX('F', 9,AF5)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi
Quoted 7 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +7
-0+ /* SPI5_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = <STM32_PINMUX('F', 8,AF5)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi
Quoted 8 lines
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +5
-0+ /* SPI5_MISO */ + bias-disable; + }; + }; + dcmi_pins: dcmi-0 { pins { pinmux = <STM32_PINMUX('A', 4,AF13)>, /*
DCMI_HSYNC*/Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/boot/dts/stm32f429-disco.dtsQuoted 10 lines
index 30c0f67..55eed05 100644
arch/arm/boot/dts/stm32f429-disco.dts +2
-0@@ -49,6 +49,8 @@ #include "stm32f429.dtsi" #include "stm32f429-pinctrl.dtsi" #include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/gpio/gpio.h>
Quoted 10 lines
arch/arm/boot/dts/stm32f429-disco.dts line 104
Quoted 8 lines
arch/arm/boot/dts/stm32f429-disco.dts +2
-0/ { model = "STMicroelectronics STM32F429i-DISCO board";@@ -98,6 +100,14 @@ regulator-name = "vcc5_host1"; regulator-always-on; }; + + reg_3p3v: regulator-3p3v {3p3 ?
*yes, the mfd stmpe driver need vcc & vio regulator, st sensor core driver
need vddio & vdd*
Quoted 52 lines
+ compatible = "regulator-fixed";
Quoted 40 lines
arch/arm/boot/dts/stm32f429-disco.dts +33
-0+ regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; }; &clk_hse {@@ -127,3 +137,81 @@ pinctrl-names = "default"; status = "okay"; }; + +<dc { + status = "okay"; + pinctrl-0 = <<dc_pins_f429_disco>; + pinctrl-names = "default"; + + port { + ltdc_out_rgb: endpoint { + remote-endpoint = <&panel_in_rgb>; + }; + }; +}; + +&spi5 { + status = "okay"; + pinctrl-0 = <&spi5_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>,<&gpioc 2 GPIO_ACTIVE_LOW>; + dmas = <&dma2 3 2 0x400 0x0>, + <&dma2 4 2 0x400 0x0>; + dma-names = "rx", "tx"; + l3gd20: l3gd20@0 { + compatible = "st,l3gd20-gyro"; + spi-max-frequency = <10000000>; + st,drdy-int-pin = <2>; + interrupt-parent = <&gpioa>;arch/arm/boot/dts/stm32f429-disco.dts line 177
Quoted 10 lines
arch/arm/boot/dts/stm32f429-disco.dts +10
-0+ interrupts = <1 IRQ_TYPE_EDGE_RISING>, + <2 IRQ_TYPE_EDGE_RISING>; + reg = <0>; + vddio = <®_3p3v>; + vdd = <®_3p3v>; + status = "okay"; + }; + display: display@1{ + /* Connect panel-ilitek-9341 to ltdc */ + compatible = "stm32f429-disco,ltdc-panel","ilitek,ili9341";
Quoted 15 lines
arch/arm/boot/dts/stm32f429-disco.dts line 190
Quoted 13 lines
arch/arm/boot/dts/stm32f429-disco.dts +13
-0+ reg = <1>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in_rgb: endpoint { + remote-endpoint = <<dc_out_rgb>; + }; + }; + }; +}; + +&i2c3 {Nodes are have to be ordered
*sorry, a little confused, i2c-3 is used by stmpe811 driver*
Quoted 30 lines
Review
Quoted 29 lines
arch/arm/boot/dts/stm32f429-disco.dts +27
-0+ pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; + status = "okay"; + + touch: stmpe811@41 { + compatible = "st,stmpe811"; + reg = <0x41>; + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpioa>; + vio = <®_3p3v>; + vcc = <®_3p3v>; + status = "okay"; + + stmpe_touchscreen { + compatible = "st,stmpe-ts"; + st,sample-time = <4>; + st,mod-12b = <1>; + st,ref-sel = <0>; + st,adc-freq = <1>; + st,ave-ctrl = <1>; + st,touch-det-delay = <2>; + st,settling = <2>; + st,fraction-z = <7>; + st,i-drive = <1>; + }; + }; +};(quoted diff) +0
-0
b/arch/arm/boot/dts/stm32f429.dtsi
Quoted 6 lines
arch/arm/boot/dts/stm32f429.dtsi
Quoted 4 lines
index d777069..257b843 100644
arch/arm/boot/dts/stm32f429.dtsi +0
-0@@ -402,6 +402,18 @@Split Soc updates in a separate patch
*okay, will do it later*
Quoted 20 lines
Quoted 9 lines
arch/arm/boot/dts/stm32f429.dtsi +5
-0status = "disabled"; }; + i2c3: i2c@40005c00 { + compatible = "st,stm32f4-i2c"; + reg = <0x40005c00 0x400>; + interrupts = <72>, + <73>;arch/arm/boot/dts/stm32f429.dtsi line 419
Quoted 10 lines
arch/arm/boot/dts/stm32f429.dtsi +7
-0+ resets = <&rcc STM32F4_APB1_RESET(I2C3)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(I2C3)>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + dac: dac@40007400 { compatible = "st,stm32f4-dac-core"; reg = <0x40007400 0x400>;
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 14 lines · dillon min
Hi Alexandre,
Alexandre Torgue <[email protected] <mailto:[email protected]>> 于2020年4月30日周四 下午5:57写道:
Hi
On 4/30/20 11:43 AM, [email protected] <mailto:[email protected]> wrote:
> From: dillon min <[email protected]
<mailto:[email protected]>>
>
> Signed-off-by: dillon min <[email protected]
<mailto:[email protected]>>
Quoted 5 lines
Commit title should be ARM: dts: stm32: bla bla on stm32f429 and please a commit message.
*okay, thanks for your quicky response, this is my first kernel pull request, i will resubmit all patchsets following the history submits style who was did.*
ok no pb. In general way you have to execute ./scripts/checkpatch.pl to check some style errors before sending. Use ./scripts/get_maintainer.pl to see to who you have to send the patch. When you have several patches in a series, you need to have a cover-letter which explains the aim of your series. To have an idea of commit format just use git log on the file changed to see how previous accepted commi have been written.
More details here: Documentation/process/submitting-patches.rst
Quoted 215 lines
> --- > .../bindings/display/panel/ilitek,ili9341.txt | 42 +++++++++++ > arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 79 +++++++++++++++++++ > arch/arm/boot/dts/stm32f429-disco.dts | 88 ++++++++++++++++++++++ > arch/arm/boot/dts/stm32f429.dtsi | 12 +++ > 4 files changed, 221 insertions(+) > create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt > > diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt This binding description should be in a separate patch and you have to write in YAML format.*okay, will do it later. *
> new file mode 100644 > index 0000000..f5a4e55 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt > @@ -0,0 +1,42 @@ > +Ilitek ILI9341 TFT panel driver with SPI control bus > + > +This is a driver for 240x320 TFT panels, accepting a rgb input > +streams that get adapted and scaled to the panel. > + > +Required properties: > + - compatible: "stm32f429-disco,ltdc-panel", "ilitek,ili9341" > + (full system-specific compatible is always required to look up configuration) > + - reg: address of the panel on the SPI bus > + > +Optional properties: > + - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt > + - dc-gpios: a GPIO spec for the dc pin, see gpio/gpio.txt > + > + The following optional properties only apply to RGB input mode: > + > + - pixelclk-active: see display/panel/display-timing.txt > + - de-active: see display/panel/display-timing.txt > + - hsync-active: see display/panel/display-timing.txt > + - vsync-active: see display/panel/display-timing.txt > + > +The panel must obey the rules for a SPI slave device as specified in > +spi/spi-bus.txt > + > +The device node can contain one 'port' child node with one child > +'endpoint' node, according to the bindings defined in > +media/video-interfaces.txt. This node should describe panel's video bus. > + > +Example: > + > +panel: display@0 { > + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; > + reg = <0>; > + spi-3wire; > + spi-max-frequency = <10000000>; > + dc-gpios = <&gpiod 13 0>; > + port { > + panel_in: endpoint { > + remote-endpoint = <&display_out>; > + }; > + }; > +}; > diff --git a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi > index 392fa14..45b68f4 100644 > --- a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi > +++ b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi > @@ -316,6 +316,85 @@ > }; > }; > > + ltdc_pins_f429_disco: ltdc-1 { > + pins { > + pinmux = <STM32_PINMUX('C', 6, AF14)>, > + /* LCD_HSYNC */ > + <STM32_PINMUX('A', 4, AF14)>, > + /* LCD_VSYNC */ > + <STM32_PINMUX('G', 7, AF14)>, > + /* LCD_CLK */ > + <STM32_PINMUX('C', 10, AF14)>, > + /* LCD_R2 */ > + <STM32_PINMUX('B', 0, AF9)>, > + /* LCD_R3 */ > + <STM32_PINMUX('A', 11, AF14)>, > + /* LCD_R4 */ > + <STM32_PINMUX('A', 12, AF14)>, > + /* LCD_R5 */ > + <STM32_PINMUX('B', 1, AF9)>, > + /* LCD_R6*/ > + <STM32_PINMUX('G', 6, AF14)>, > + /* LCD_R7 */ > + <STM32_PINMUX('A', 6, AF14)>, > + /* LCD_G2 */ > + <STM32_PINMUX('G', 10, AF9)>, > + /* LCD_G3 */ > + <STM32_PINMUX('B', 10, AF14)>, > + /* LCD_G4 */ > + <STM32_PINMUX('D', 6, AF14)>, > + /* LCD_B2 */ > + <STM32_PINMUX('G', 11, AF14)>, > + /* LCD_B3*/ > + <STM32_PINMUX('B', 11, AF14)>, > + /* LCD_G5 */ > + <STM32_PINMUX('C', 7, AF14)>, > + /* LCD_G6 */ > + <STM32_PINMUX('D', 3, AF14)>, > + /* LCD_G7 */ > + <STM32_PINMUX('G', 12, AF9)>, > + /* LCD_B4 */ > + <STM32_PINMUX('A', 3, AF14)>, > + /* LCD_B5 */ > + <STM32_PINMUX('B', 8, AF14)>, > + /* LCD_B6 */ > + <STM32_PINMUX('B', 9, AF14)>, > + /* LCD_B7 */ > + <STM32_PINMUX('F', 10, AF14)>; > + /* LCD_DE */ > + slew-rate = <2>; > + }; > + }; > + > + i2c3_pins: i2c3-0 { > + pins { > + pinmux = <STM32_PINMUX('C', 9, AF4)>, > + /* I2C3_SDA */ > + <STM32_PINMUX('A', 8, AF4)>; > + /* I2C3_SCL */ > + bias-disable; > + drive-open-drain; > + slew-rate = <3>; > + }; > + }; > + > + spi5_pins: spi5-0 { > + pins1 { > + pinmux = <STM32_PINMUX('F', 7, AF5)>, > + /* SPI5_CLK */ > + <STM32_PINMUX('F', 9, AF5)>; > + /* SPI5_MOSI */ > + bias-disable; > + drive-push-pull; > + slew-rate = <0>; > + }; > + pins2 { > + pinmux = <STM32_PINMUX('F', 8, AF5)>; > + /* SPI5_MISO */ > + bias-disable; > + }; > + }; > + > dcmi_pins: dcmi-0 { > pins { > pinmux = <STM32_PINMUX('A', 4, AF13)>, /* DCMI_HSYNC */ > diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-disco.dts > index 30c0f67..55eed05 100644 > --- a/arch/arm/boot/dts/stm32f429-disco.dts > +++ b/arch/arm/boot/dts/stm32f429-disco.dts > @@ -49,6 +49,8 @@ > #include "stm32f429.dtsi" > #include "stm32f429-pinctrl.dtsi" > #include <dt-bindings/input/input.h> > +#include <dt-bindings/interrupt-controller/irq.h> > +#include <dt-bindings/gpio/gpio.h> > > / { > model = "STMicroelectronics STM32F429i-DISCO board"; > @@ -98,6 +100,14 @@ > regulator-name = "vcc5_host1"; > regulator-always-on; > }; > + > + reg_3p3v: regulator-3p3v { 3p3 ?
Quoted 1 line
*yes, the mfd stmpe driver need vcc & vio regulator, st sensor core driver need vddio & vdd*
I talked about the name. Somthing vdd_3v3 would be better. See how it is done in other stm32fx platform
Quoted 122 lines
> + compatible = "regulator-fixed"; > + regulator-name = "3P3V"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + }; > }; > > &clk_hse { > @@ -127,3 +137,81 @@ > pinctrl-names = "default"; > status = "okay"; > }; > + > +<dc { > + status = "okay"; > + pinctrl-0 = <<dc_pins_f429_disco>; > + pinctrl-names = "default"; > + > + port { > + ltdc_out_rgb: endpoint { > + remote-endpoint = <&panel_in_rgb>; > + }; > + }; > +}; > + > +&spi5 { > + status = "okay"; > + pinctrl-0 = <&spi5_pins>; > + pinctrl-names = "default"; > + #address-cells = <1>; > + #size-cells = <0>; > + cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>,<&gpioc 2 GPIO_ACTIVE_LOW>; > + dmas = <&dma2 3 2 0x400 0x0>, > + <&dma2 4 2 0x400 0x0>; > + dma-names = "rx", "tx"; > + l3gd20: l3gd20@0 { > + compatible = "st,l3gd20-gyro"; > + spi-max-frequency = <10000000>; > + st,drdy-int-pin = <2>; > + interrupt-parent = <&gpioa>; > + interrupts = <1 IRQ_TYPE_EDGE_RISING>, > + <2 IRQ_TYPE_EDGE_RISING>; > + reg = <0>; > + vddio = <®_3p3v>; > + vdd = <®_3p3v>; > + status = "okay"; > + }; > + display: display@1{ > + /* Connect panel-ilitek-9341 to ltdc */ > + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; > + reg = <1>; > + spi-3wire; > + spi-max-frequency = <10000000>; > + dc-gpios = <&gpiod 13 0>; > + port { > + panel_in_rgb: endpoint { > + remote-endpoint = <<dc_out_rgb>; > + }; > + }; > + }; > +}; > + > +&i2c3 { Nodes are have to be ordered*sorry, a little confused, i2c-3 is used by stmpe811 driver*
> + pinctrl-names = "default"; > + pinctrl-0 = <&i2c3_pins>; > + status = "okay"; > + > + touch: stmpe811@41 { > + compatible = "st,stmpe811"; > + reg = <0x41>; > + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; > + interrupt-parent = <&gpioa>; > + vio = <®_3p3v>; > + vcc = <®_3p3v>; > + status = "okay"; > + > + stmpe_touchscreen { > + compatible = "st,stmpe-ts"; > + st,sample-time = <4>; > + st,mod-12b = <1>; > + st,ref-sel = <0>; > + st,adc-freq = <1>; > + st,ave-ctrl = <1>; > + st,touch-det-delay = <2>; > + st,settling = <2>; > + st,fraction-z = <7>; > + st,i-drive = <1>; > + }; > + }; > +}; > diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi > index d777069..257b843 100644 > --- a/arch/arm/boot/dts/stm32f429.dtsi > +++ b/arch/arm/boot/dts/stm32f429.dtsi > @@ -402,6 +402,18 @@ Split Soc updates in a separate patch*okay, will do it later*
> status = "disabled"; > }; > > + i2c3: i2c@40005c00 { > + compatible = "st,stm32f4-i2c"; > + reg = <0x40005c00 0x400>; > + interrupts = <72>, > + <73>; > + resets = <&rcc STM32F4_APB1_RESET(I2C3)>; > + clocks = <&rcc 0 STM32F4_APB1_CLOCK(I2C3)>; > + #address-cells = <1>;
Quoted 9 lines
> + #size-cells = <0>;
> + status = "disabled";
> + };
> +
> dac: dac@40007400 {
> compatible = "st,stm32f4-dac-core";
> reg = <0x40007400 0x400>;
>_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Alexandre,
Quoted 34 lines · Alexandre Torgue <[email protected]> 于2020年4月30日周四 下午7:45写道:
Quoted 15 lines · dillon min
Hi Alexandre,
Alexandre Torgue <[email protected] <mailto:[email protected]>> 于2020年4月30日周四 下午5:57写道:
Hi
On 4/30/20 11:43 AM, [email protected] <mailto:[email protected]> wrote:
> From: dillon min <[email protected]
<mailto:[email protected]>>
>
> Signed-off-by: dillon min <[email protected]
<mailto:[email protected]>>Quoted 1 line
Commit title should be ARM: dts: stm32: bla bla on stm32f429 and
please
Quoted 6 lines
a commit message.
*okay, thanks for your quicky response, this is my first kernel pull request, i will resubmit all patchsets following the history submits style who was did.*
ok no pb. In general way you have to execute
./scripts/checkpatch.plto check some style errors before sending. Use./scripts/get_maintainer.plto see to who you have to send the patch. When you have several patches in a series, you need to have a cover-letter which explains the aim of your series. To have an idea of commit format just use git log on the file changed to see how previous accepted commi have been written.
Quoted 3 lines
More details here:
Documentation/process/submitting-patches.rstokay, thanks alexandre, i will go through these docs. currently i'm on may
day holiday, will be back at next wensday.
after go back to work. i will separate this patch to five part with 9 patchs , should be more clear
dts releated
1, ARM: dts: stm32: Add i2c3 node for stm32f429
2, ARM: dts: stm32: Add drm panel ili9341 nodes connect to ldtc
support for stm32f429-disco board
3, ARM: dts: stm32: Add stmpe811 touch screen support for
stm32f429-disco board
4, ARM: dts: stm32: Add l3gd20 gyroscope sensor support for
stm32f429-disco board
clk releated
1, clk: stm32: Fix ltdc loading hang in set clk rate, pll_hw set to
clks[PLL_VCO_SAI] but not clks[PLL_SAI]
2, clk: stm32: Add CLK_IGNORE_UNUSED flags for ltdc, make sure ltdc clk
not be released after system startup
spi releated
1, spi: stm32: Add transfer mode SPI_SIMPLE_RX, SPI_3WIRE_RX support
for stm32f4
drm releated
1, drm/panel: Add panel driver ilitek-ili9341
doc releated
1, dt-bindings: display: panel: Add binding document for Ilitek Ili9341
TODO:
ltdc was verified by fbcon+logo, uname -a > /dev/tty0 , need more time to write test code with libdrm to verify osd
stmpe811 need cross compile tslib to do touch screen calibration l3gd20 was tested by read data from /sys/bus/iio, need cross compile libiio to be verified by application with libiio
add dma2d to ltdc driver to speed up graphic render
dcmi camera with ov5640, the sdram might be not enough to support this. currently after zImage load to sdram,
just leave less than 2M bytes for application.
Quoted 218 lines
Quoted 3 lines
> --- > .../bindings/display/panel/ilitek,ili9341.txt | 42+++++++++++
Quoted 6 lines
> arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 79 +++++++++++++++++++ > arch/arm/boot/dts/stm32f429-disco.dts | 88 ++++++++++++++++++++++ > arch/arm/boot/dts/stm32f429.dtsi | 12 +++ > 4 files changed, 221 insertions(+)Quoted 8 lines
> create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt > > diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt This binding description should be in a separate patch and you haveto
Quoted 26 lines
write in YAML format.
*okay, will do it later. *
> new file mode 100644
> index 0000000..f5a4e55
> ---/dev/null
> +++
b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt
> @@ -0,0 +1,42 @@
> +Ilitek ILI9341 TFT panel driver with SPI control bus > +
> +This is a driver for 240x320 TFT panels, accepting a rgb input > +streams that get adapted and scaled to the panel.
> +
> +Required properties:
> + - compatible: "stm32f429-disco,ltdc-panel", "ilitek,ili9341"
> + (full system-specific compatible is always required to look
up configuration)
> + - reg: address of the panel on the SPI bus
> +
> +Optional properties:
> + - reset-gpios: a GPIO spec for the reset pin, seegpio/gpio.txt> + - dc-gpios: a GPIO spec for the dc pin, seegpio/gpio.txt> +Quoted 8 lines
> + The following optional properties only apply to RGB input mode:
> +
> + - pixelclk-active: seedisplay/panel/display-timing.txt> + - de-active: seedisplay/panel/display-timing.txt
> + - hsync-active: seedisplay/panel/display-timing.txt> + - vsync-active: seedisplay/panel/display-timing.txt> +
> +The panel must obey the rules for a SPI slave device asspecified in
Quoted 164 lines
> +spi/spi-bus.txt > + > +The device node can contain one 'port' child node with one child > +'endpoint' node, according to the bindings defined in > +media/video-interfaces.txt. This node should describe panel's video bus. > + > +Example: > + > +panel: display@0 { > + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; > + reg = <0>; > + spi-3wire; > + spi-max-frequency = <10000000>; > + dc-gpios = <&gpiod 13 0>; > + port { > + panel_in: endpoint { > + remote-endpoint = <&display_out>; > + }; > + }; > +}; > diff --git a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi > index 392fa14..45b68f4 100644 > --- a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi > +++ b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi > @@ -316,6 +316,85 @@ > }; > }; > > + ltdc_pins_f429_disco: ltdc-1 { > + pins { > + pinmux = <STM32_PINMUX('C', 6, AF14)>, > + /* LCD_HSYNC */ > + <STM32_PINMUX('A', 4, AF14)>, > + /* LCD_VSYNC */ > + <STM32_PINMUX('G', 7, AF14)>, > + /* LCD_CLK */ > + <STM32_PINMUX('C', 10, AF14)>, > + /* LCD_R2 */ > + <STM32_PINMUX('B', 0, AF9)>, > + /* LCD_R3 */ > + <STM32_PINMUX('A', 11, AF14)>, > + /* LCD_R4 */ > + <STM32_PINMUX('A', 12, AF14)>, > + /* LCD_R5 */ > + <STM32_PINMUX('B', 1, AF9)>, > + /* LCD_R6*/ > + <STM32_PINMUX('G', 6, AF14)>, > + /* LCD_R7 */ > + <STM32_PINMUX('A', 6, AF14)>, > + /* LCD_G2 */ > + <STM32_PINMUX('G', 10, AF9)>, > + /* LCD_G3 */ > + <STM32_PINMUX('B', 10, AF14)>, > + /* LCD_G4 */ > + <STM32_PINMUX('D', 6, AF14)>, > + /* LCD_B2 */ > + <STM32_PINMUX('G', 11, AF14)>, > + /* LCD_B3*/ > + <STM32_PINMUX('B', 11, AF14)>, > + /* LCD_G5 */ > + <STM32_PINMUX('C', 7, AF14)>, > + /* LCD_G6 */ > + <STM32_PINMUX('D', 3, AF14)>, > + /* LCD_G7 */ > + <STM32_PINMUX('G', 12, AF9)>, > + /* LCD_B4 */ > + <STM32_PINMUX('A', 3, AF14)>, > + /* LCD_B5 */ > + <STM32_PINMUX('B', 8, AF14)>, > + /* LCD_B6 */ > + <STM32_PINMUX('B', 9, AF14)>, > + /* LCD_B7 */ > + <STM32_PINMUX('F', 10, AF14)>; > + /* LCD_DE */ > + slew-rate = <2>; > + }; > + }; > + > + i2c3_pins: i2c3-0 { > + pins { > + pinmux = <STM32_PINMUX('C', 9, AF4)>, > + /* I2C3_SDA */ > + <STM32_PINMUX('A', 8, AF4)>; > + /* I2C3_SCL */ > + bias-disable; > + drive-open-drain; > + slew-rate = <3>; > + }; > + }; > + > + spi5_pins: spi5-0 { > + pins1 { > + pinmux = <STM32_PINMUX('F', 7, AF5)>, > + /* SPI5_CLK */ > + <STM32_PINMUX('F', 9, AF5)>; > + /* SPI5_MOSI */ > + bias-disable; > + drive-push-pull; > + slew-rate = <0>; > + }; > + pins2 { > + pinmux = <STM32_PINMUX('F', 8, AF5)>; > + /* SPI5_MISO */ > + bias-disable; > + }; > + }; > + > dcmi_pins: dcmi-0 { > pins { > pinmux = <STM32_PINMUX('A', 4, AF13)>, /* DCMI_HSYNC */ > diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-disco.dts > index 30c0f67..55eed05 100644 > --- a/arch/arm/boot/dts/stm32f429-disco.dts > +++ b/arch/arm/boot/dts/stm32f429-disco.dts > @@ -49,6 +49,8 @@ > #include "stm32f429.dtsi" > #include "stm32f429-pinctrl.dtsi" > #include <dt-bindings/input/input.h> > +#include <dt-bindings/interrupt-controller/irq.h> > +#include <dt-bindings/gpio/gpio.h> > > / { > model = "STMicroelectronics STM32F429i-DISCO board"; > @@ -98,6 +100,14 @@ > regulator-name = "vcc5_host1"; > regulator-always-on; > }; > + > + reg_3p3v: regulator-3p3v { 3p3 ?
Quoted 81 lines
Quoted 2 lines
*yes, the mfd stmpe driver need vcc & vio regulator, st sensor core driver need vddio & vdd*
I talked about the name. Somthing
vdd_3v3would be better. See how it is done in other stm32fx platformOkay, will change to
vdd_3v3Quoted 71 lines
> + compatible = "regulator-fixed"; > + regulator-name = "3P3V"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + }; > }; > > &clk_hse { > @@ -127,3 +137,81 @@ > pinctrl-names = "default"; > status = "okay"; > }; > + > +<dc { > + status = "okay"; > + pinctrl-0 = <<dc_pins_f429_disco>; > + pinctrl-names = "default"; > + > + port { > + ltdc_out_rgb: endpoint { > + remote-endpoint = <&panel_in_rgb>; > + }; > + }; > +}; > + > +&spi5 { > + status = "okay"; > + pinctrl-0 = <&spi5_pins>; > + pinctrl-names = "default"; > + #address-cells = <1>; > + #size-cells = <0>; > + cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>,<&gpioc 2 GPIO_ACTIVE_LOW>; > + dmas = <&dma2 3 2 0x400 0x0>, > + <&dma2 4 2 0x400 0x0>; > + dma-names = "rx", "tx"; > + l3gd20: l3gd20@0 { > + compatible = "st,l3gd20-gyro"; > + spi-max-frequency = <10000000>; > + st,drdy-int-pin = <2>; > + interrupt-parent = <&gpioa>; > + interrupts = <1 IRQ_TYPE_EDGE_RISING>, > + <2 IRQ_TYPE_EDGE_RISING>; > + reg = <0>; > + vddio = <®_3p3v>; > + vdd = <®_3p3v>; > + status = "okay"; > + }; > + display: display@1{ > + /* Connect panel-ilitek-9341 to ltdc */ > + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; > + reg = <1>; > + spi-3wire; > + spi-max-frequency = <10000000>; > + dc-gpios = <&gpiod 13 0>; > + port { > + panel_in_rgb: endpoint { > + remote-endpoint = <<dc_out_rgb>; > + }; > + }; > + }; > +}; > + > +&i2c3 { Nodes are have to be ordered*sorry, a little confused, i2c-3 is used by stmpe811 driver*
please give more information here, thanks.
Quoted 52 lines
Quoted 52 lines
> + pinctrl-names = "default"; > + pinctrl-0 = <&i2c3_pins>; > + status = "okay"; > + > + touch: stmpe811@41 { > + compatible = "st,stmpe811"; > + reg = <0x41>; > + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; > + interrupt-parent = <&gpioa>; > + vio = <®_3p3v>; > + vcc = <®_3p3v>; > + status = "okay"; > + > + stmpe_touchscreen { > + compatible = "st,stmpe-ts"; > + st,sample-time = <4>; > + st,mod-12b = <1>; > + st,ref-sel = <0>; > + st,adc-freq = <1>; > + st,ave-ctrl = <1>; > + st,touch-det-delay = <2>; > + st,settling = <2>; > + st,fraction-z = <7>; > + st,i-drive = <1>; > + }; > + }; > +}; > diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi > index d777069..257b843 100644 > --- a/arch/arm/boot/dts/stm32f429.dtsi > +++ b/arch/arm/boot/dts/stm32f429.dtsi > @@ -402,6 +402,18 @@ Split Soc updates in a separate patch*okay, will do it later*
> status = "disabled"; > }; > > + i2c3: i2c@40005c00 { > + compatible = "st,stm32f4-i2c"; > + reg = <0x40005c00 0x400>; > + interrupts = <72>, > + <73>; > + resets = <&rcc STM32F4_APB1_RESET(I2C3)>; > + clocks = <&rcc 0 STM32F4_APB1_CLOCK(I2C3)>; > + #address-cells = <1>; > + #size-cells = <0>;
Quoted 9 lines
Quoted 8 lines
> + status = "disabled"; > + }; > + > dac: dac@40007400 { > compatible = "st,stm32f4-dac-core"; > reg = <0x40007400 0x400>; >
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi dillon min
Quoted 24 lines
Quoted 1 line
okay, thanks alexandre, i will go through these docs. currently i'm on may
day holiday, will be back at next wensday.
after go back to work. i will separate this patch to five part with 9 patchs , should be more cleardts releated
1, ARM: dts: stm32: Add i2c3 node for stm32f429
2, ARM: dts: stm32: Add drm panel ili9341 nodes connect to ldtc
support for stm32f429-disco board
3, ARM: dts: stm32: Add stmpe811 touch screen support for
stm32f429-disco board
4, ARM: dts: stm32: Add l3gd20 gyroscope sensor support for
stm32f429-disco boardclk releated
1, clk: stm32: Fix ltdc loading hang in set clk rate,pll_hwset to
clks[PLL_VCO_SAI] but not clks[PLL_SAI]
2, clk: stm32: AddCLK_IGNORE_UNUSEDflags for ltdc, make sure ltdc clk
not be released after system startupspi releated
1, spi: stm32: Add transfer modeSPI_SIMPLE_RX,SPI_3WIRE_RXsupport
for stm32f4
Quoted 5 lines
drm releated
1, drm/panel: Add panel driver ilitek-ili9341doc releated
1, dt-bindings: display: panel: Add binding document for Ilitek Ili9341
Patch separation looks good.
Please cc: me on both the binding and the panel patches. The binding must be in DT Schema format (.yaml). See a lot of examples in drm-misc-next for inspiration.
Looks forward to see/review your submission.
Sam
Quoted 35 lines · Sam Ravnborg <[email protected]> 于2020年5月2日周六 下午2:30写道:
Hi dillon min
Quoted 1 line
Quoted 1 line
okay, thanks alexandre, i will go through these docs. currently i'm on
may
Quoted 13 lines
day holiday, will be back at next wensday.
after go back to work. i will separate this patch to five part with 9 patchs , should be more cleardts releated
1, ARM: dts: stm32: Add i2c3 node for stm32f429
2, ARM: dts: stm32: Add drm panel ili9341 nodes connect to ldtc
support for stm32f429-disco board
3, ARM: dts: stm32: Add stmpe811 touch screen support for
stm32f429-disco board
4, ARM: dts: stm32: Add l3gd20 gyroscope sensor support for
stm32f429-disco boardQuoted 4 lines
clk releated
1, clk: stm32: Fix ltdc loading hang in set clk rate,pll_hwset to
clks[PLL_VCO_SAI] but not clks[PLL_SAI]
2, clk: stm32: AddCLK_IGNORE_UNUSEDflags for ltdc, make sure ltdcclk
Quoted 11 lines
not be released after system startup
spi releated
1, spi: stm32: Add transfer modeSPI_SIMPLE_RX,SPI_3WIRE_RXsupport
for stm32f4drm releated
1, drm/panel: Add panel driver ilitek-ili9341doc releated
1, dt-bindings: display: panel: Add binding document for IlitekIli9341
Quoted 9 lines
Patch separation looks good.
Please cc: me on both the binding and the panel patches. The binding must be in DT Schema format (.yaml). See a lot of examples in drm-misc-next for inspiration.Looks forward to see/review your submission.
Sam
hi Sam,
just sumbmit a patchset about ltdc with ili-9341 support on stm32f429-disco board, with yaml
documents inside as well.
thanks,
Dillon,
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 281 lines · On Thu, 2020-04-30 at 17:43 +0800, [email protected] wrote:
From: dillon min <[email protected]>
Signed-off-by dillon min <[email protected]>--- .../bindings/display/panel/ilitek,ili9341.txt | 42 +++++++++++ arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 79 +++++++++++++++++++ arch/arm/boot/dts/stm32f429-disco.dts | 88 ++++++++++++++++++++++ arch/arm/boot/dts/stm32f429.dtsi | 12 +++ 4 files changed, 221 insertions(+) create mode 100644
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtdiff --git
a/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtb/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtnew file mode 100644
index 0000000..f5a4e55
---/dev/null
+++b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtDocumentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +8
-0@@ -0,0 +1,42 @@ +Ilitek ILI9341 TFT panel driver with SPI control bus + +This is a driver for 240x320 TFT panels, accepting a rgb input +streams that get adapted and scaled to the panel. + +Required properties: + - compatible: "stm32f429-disco,ltdc-panel", "ilitek,ili9341" + (full system-specific compatible is always required to look upconfiguration)
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +19
-0+ - reg: address of the panel on the SPI bus + +Optional properties: + - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt + - dc-gpios: a GPIO spec for the dc pin, see gpio/gpio.txt + + The following optional properties only apply to RGB input mode: + + - pixelclk-active: see display/panel/display-timing.txt + - de-active: see display/panel/display-timing.txt + - hsync-active: see display/panel/display-timing.txt + - vsync-active: see display/panel/display-timing.txt + +The panel must obey the rules for a SPI slave device as specified in +spi/spi-bus.txt + +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in +media/video-interfaces.txt. This node should describe panel's videobus.
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +15
-0+ +Example: + +panel: display@0 { + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; + reg = <0>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; +};arch/arm/boot/dts/stm32f4-pinctrl.dtsi +9
-0@@ -316,6 +316,85 @@ }; }; + ltdc_pins_f429_disco: ltdc-1 { + pins { + pinmux = <STM32_PINMUX('C', 6, AF14)>, + /* LCD_HSYNC */ + <STM32_PINMUX('A', 4, AF14)>, + /* LCD_VSYNC */ + <STM32_PINMUX('G', 7, AF14)>, + /* LCD_CLK */ + <STM32_PINMUX('C', 10,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R2 */ + <STM32_PINMUX('B',0, AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R3 */ + <STM32_PINMUX('A', 11,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R4 */ + <STM32_PINMUX('A', 12,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R5 */ + <STM32_PINMUX('B',1, AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R6*/ + <STM32_PINMUX('G',6, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R7 */ + <STM32_PINMUX('A',6, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G2 */ + <STM32_PINMUX('G', 10,AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G3 */ + <STM32_PINMUX('B', 10,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G4 */ + <STM32_PINMUX('D',6, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B2 */ + <STM32_PINMUX('G', 11,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B3*/ + <STM32_PINMUX('B', 11,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G5 */ + <STM32_PINMUX('C',7, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G6 */ + <STM32_PINMUX('D',3, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G7 */ + <STM32_PINMUX('G', 12,AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B4 */ + <STM32_PINMUX('A',3, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B5 */ + <STM32_PINMUX('B',8, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B6 */ + <STM32_PINMUX('B',9, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B7 */ + <STM32_PINMUX('F', 10,AF14)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +8
-0+ /* LCD_DE */ + slew-rate = <2>; + }; + }; + + i2c3_pins: i2c3-0 { + pins { + pinmux = <STM32_PINMUX('C', 9,AF4)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* I2C3_SDA */ + <STM32_PINMUX('A', 8,AF4)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +10
-0+ /* I2C3_SCL */ + bias-disable; + drive-open-drain; + slew-rate = <3>; + }; + }; + + spi5_pins: spi5-0 { + pins1 { + pinmux = <STM32_PINMUX('F', 7,AF5)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* SPI5_CLK */ + <STM32_PINMUX('F', 9,AF5)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +7
-0+ /* SPI5_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = <STM32_PINMUX('F', 8,AF5)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +5
-0+ /* SPI5_MISO */ + bias-disable; + }; + }; + dcmi_pins: dcmi-0 { pins { pinmux = <STM32_PINMUX('A', 4,AF13)>, /*
DCMI_HSYNC*/arch/arm/boot/dts/stm32f429-disco.dts +30
-0@@ -49,6 +49,8 @@ #include "stm32f429.dtsi" #include "stm32f429-pinctrl.dtsi" #include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/gpio/gpio.h> / { model = "STMicroelectronics STM32F429i-DISCO board";@@ -98,6 +100,14 @@ regulator-name = "vcc5_host1"; regulator-always-on; }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; }; &clk_hse {@@ -127,3 +137,81 @@ pinctrl-names = "default"; status = "okay"; }; + +<dc { + status = "okay"; + pinctrl-0 = <<dc_pins_f429_disco>; + pinctrl-names = "default"; + + port { + ltdc_out_rgb: endpoint { + remote-endpoint = <&panel_in_rgb>; + }; + }; +}; + +&spi5 { + status = "okay"; + pinctrl-0 = <&spi5_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>,<&gpioc 2
GPIO_ACTIVE_LOW>;arch/arm/boot/dts/stm32f429-disco.dts +18
-0+ dmas = <&dma2 3 2 0x400 0x0>, + <&dma2 4 2 0x400 0x0>; + dma-names = "rx", "tx"; + l3gd20: l3gd20@0 { + compatible = "st,l3gd20-gyro"; + spi-max-frequency = <10000000>; + st,drdy-int-pin = <2>; + interrupt-parent = <&gpioa>; + interrupts = <1 IRQ_TYPE_EDGE_RISING>, + <2 IRQ_TYPE_EDGE_RISING>; + reg = <0>; + vddio = <®_3p3v>; + vdd = <®_3p3v>; + status = "okay"; + }; + display: display@1{ + /* Connect panel-ilitek-9341 to ltdc */ + compatible = "stm32f429-disco,ltdc-panel","ilitek,ili9341";
arch/arm/boot/dts/stm32f429-disco.dts +22
-0+ reg = <1>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in_rgb: endpoint { + remote-endpoint = <<dc_out_rgb>; + }; + }; + }; +}; + +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; + status = "okay"; + + touch: stmpe811@41 { + compatible = "st,stmpe811"; + reg = <0x41>; + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpioa>;
arch/arm/boot/dts/stm32f429-disco.dts line 209
Quoted 10 lines
arch/arm/boot/dts/stm32f429-disco.dts +10
-0+ vio = <®_3p3v>; + vcc = <®_3p3v>; + status = "okay"; + + stmpe_touchscreen { + compatible = "st,stmpe-ts"; + st,sample-time = <4>; + st,mod-12b = <1>; + st,ref-sel = <0>; + st,adc-freq = <1>;
The above ADC related settings should go into the MFD device with compatible "st,stmpe811". The use of those in touchscreen is deprecated.
Please check the bindings:Documentation/devicetree/bindings/input/touchscreen/stmpe.txtDocumentation/devicetree/bindings/mfd/stmpe.txt
Best Regards,
Philippe
Quoted 32 lines
arch/arm/boot/dts/stm32f429-disco.dts +8
-0+ st,ave-ctrl = <1>; + st,touch-det-delay = <2>; + st,settling = <2>; + st,fraction-z = <7>; + st,i-drive = <1>; + }; + }; +};arch/arm/boot/dts/stm32f429.dtsi +12
-0@@ -402,6 +402,18 @@ status = "disabled"; }; + i2c3: i2c@40005c00 { + compatible = "st,stm32f4-i2c"; + reg = <0x40005c00 0x400>; + interrupts = <72>, + <73>; + resets = <&rcc STM32F4_APB1_RESET(I2C3)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(I2C3)>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + dac: dac@40007400 { compatible = "st,stm32f4-dac-core"; reg = <0x40007400 0x400>;
Quoted 325 lines · Philippe Schenker <[email protected]> 于 2020年4月30日周四 20:08写道:
Quoted 281 lines · On Thu, 2020-04-30 at 17:43 +0800, [email protected] wrote:
From: dillon min <[email protected]>
Signed-off-by dillon min <[email protected]>--- .../bindings/display/panel/ilitek,ili9341.txt | 42 +++++++++++ arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 79 +++++++++++++++++++ arch/arm/boot/dts/stm32f429-disco.dts | 88 ++++++++++++++++++++++ arch/arm/boot/dts/stm32f429.dtsi | 12 +++ 4 files changed, 221 insertions(+) create mode 100644
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtdiff --git
a/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtb/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtnew file mode 100644
index 0000000..f5a4e55
---/dev/null
+++b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txtDocumentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +8
-0@@ -0,0 +1,42 @@ +Ilitek ILI9341 TFT panel driver with SPI control bus + +This is a driver for 240x320 TFT panels, accepting a rgb input +streams that get adapted and scaled to the panel. + +Required properties: + - compatible: "stm32f429-disco,ltdc-panel", "ilitek,ili9341" + (full system-specific compatible is always required to look upconfiguration)
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +19
-0+ - reg: address of the panel on the SPI bus + +Optional properties: + - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt + - dc-gpios: a GPIO spec for the dc pin, see gpio/gpio.txt + + The following optional properties only apply to RGB input mode: + + - pixelclk-active: see display/panel/display-timing.txt + - de-active: see display/panel/display-timing.txt + - hsync-active: see display/panel/display-timing.txt + - vsync-active: see display/panel/display-timing.txt + +The panel must obey the rules for a SPI slave device as specified in +spi/spi-bus.txt + +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in +media/video-interfaces.txt. This node should describe panel's videobus.
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt new file +15
-0+ +Example: + +panel: display@0 { + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; + reg = <0>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; +};arch/arm/boot/dts/stm32f4-pinctrl.dtsi +9
-0@@ -316,6 +316,85 @@ }; }; + ltdc_pins_f429_disco: ltdc-1 { + pins { + pinmux = <STM32_PINMUX('C', 6, AF14)>, + /* LCD_HSYNC */ + <STM32_PINMUX('A', 4, AF14)>, + /* LCD_VSYNC */ + <STM32_PINMUX('G', 7, AF14)>, + /* LCD_CLK */ + <STM32_PINMUX('C', 10,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R2 */ + <STM32_PINMUX('B',0, AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R3 */ + <STM32_PINMUX('A', 11,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R4 */ + <STM32_PINMUX('A', 12,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R5 */ + <STM32_PINMUX('B',1, AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R6*/ + <STM32_PINMUX('G',6, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_R7 */ + <STM32_PINMUX('A',6, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G2 */ + <STM32_PINMUX('G', 10,AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G3 */ + <STM32_PINMUX('B', 10,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G4 */ + <STM32_PINMUX('D',6, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B2 */ + <STM32_PINMUX('G', 11,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B3*/ + <STM32_PINMUX('B', 11,AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G5 */ + <STM32_PINMUX('C',7, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G6 */ + <STM32_PINMUX('D',3, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_G7 */ + <STM32_PINMUX('G', 12,AF9)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B4 */ + <STM32_PINMUX('A',3, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B5 */ + <STM32_PINMUX('B',8, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B6 */ + <STM32_PINMUX('B',9, AF14)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* LCD_B7 */ + <STM32_PINMUX('F', 10,AF14)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +8
-0+ /* LCD_DE */ + slew-rate = <2>; + }; + }; + + i2c3_pins: i2c3-0 { + pins { + pinmux = <STM32_PINMUX('C', 9,AF4)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* I2C3_SDA */ + <STM32_PINMUX('A', 8,AF4)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +10
-0+ /* I2C3_SCL */ + bias-disable; + drive-open-drain; + slew-rate = <3>; + }; + }; + + spi5_pins: spi5-0 { + pins1 { + pinmux = <STM32_PINMUX('F', 7,AF5)>,
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +2
-0+ /* SPI5_CLK */ + <STM32_PINMUX('F', 9,AF5)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +7
-0+ /* SPI5_MOSI */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = <STM32_PINMUX('F', 8,AF5)>;
arch/arm/boot/dts/stm32f4-pinctrl.dtsi +5
-0+ /* SPI5_MISO */ + bias-disable; + }; + }; + dcmi_pins: dcmi-0 { pins { pinmux = <STM32_PINMUX('A', 4,AF13)>, /*
DCMI_HSYNC*/arch/arm/boot/dts/stm32f429-disco.dts +30
-0@@ -49,6 +49,8 @@ #include "stm32f429.dtsi" #include "stm32f429-pinctrl.dtsi" #include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/gpio/gpio.h> / { model = "STMicroelectronics STM32F429i-DISCO board";@@ -98,6 +100,14 @@ regulator-name = "vcc5_host1"; regulator-always-on; }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; }; &clk_hse {@@ -127,3 +137,81 @@ pinctrl-names = "default"; status = "okay"; }; + +<dc { + status = "okay"; + pinctrl-0 = <<dc_pins_f429_disco>; + pinctrl-names = "default"; + + port { + ltdc_out_rgb: endpoint { + remote-endpoint = <&panel_in_rgb>; + }; + }; +}; + +&spi5 { + status = "okay"; + pinctrl-0 = <&spi5_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>,<&gpioc 2
GPIO_ACTIVE_LOW>;arch/arm/boot/dts/stm32f429-disco.dts +18
-0+ dmas = <&dma2 3 2 0x400 0x0>, + <&dma2 4 2 0x400 0x0>; + dma-names = "rx", "tx"; + l3gd20: l3gd20@0 { + compatible = "st,l3gd20-gyro"; + spi-max-frequency = <10000000>; + st,drdy-int-pin = <2>; + interrupt-parent = <&gpioa>; + interrupts = <1 IRQ_TYPE_EDGE_RISING>, + <2 IRQ_TYPE_EDGE_RISING>; + reg = <0>; + vddio = <®_3p3v>; + vdd = <®_3p3v>; + status = "okay"; + }; + display: display@1{ + /* Connect panel-ilitek-9341 to ltdc */ + compatible = "stm32f429-disco,ltdc-panel","ilitek,ili9341";
arch/arm/boot/dts/stm32f429-disco.dts +22
-0+ reg = <1>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in_rgb: endpoint { + remote-endpoint = <<dc_out_rgb>; + }; + }; + }; +}; + +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; + status = "okay"; + + touch: stmpe811@41 { + compatible = "st,stmpe811"; + reg = <0x41>; + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpioa>;arch/arm/boot/dts/stm32f429-disco.dts line 209
Quoted 10 lines
arch/arm/boot/dts/stm32f429-disco.dts +10
-0+ vio = <®_3p3v>; + vcc = <®_3p3v>; + status = "okay"; + + stmpe_touchscreen { + compatible = "st,stmpe-ts"; + st,sample-time = <4>; + st,mod-12b = <1>; + st,ref-sel = <0>; + st,adc-freq = <1>;The above ADC related settings should go into the MFD device with compatible "st,stmpe811". The use of those in touchscreen is deprecated.
Please check the bindings:
Documentation/devicetree/bindings/input/touchscreen/stmpe.txtDocumentation/devicetree/bindings/mfd/stmpe.txtBest Regards,
PhilippePhilippe,thanks. i will try it later, and move touch panel & gyro patchs out of this sets, after well tested, i'll resubmit it.
+ st,ave-ctrl = <1>;
Quoted 16 lines
arch/arm/boot/dts/stm32f429-disco.dts +7
-0+ st,touch-det-delay = <2>; + st,settling = <2>; + st,fraction-z = <7>; + st,i-drive = <1>; + }; + }; +};arch/arm/boot/dts/stm32f429.dtsi +0
-0@@ -402,6 +402,18 @@ status = "disabled"; };
Quoted 16 lines
Quoted 5 lines
arch/arm/boot/dts/stm32f429.dtsi +5
-0+ i2c3: i2c@40005c00 { + compatible = "st,stm32f4-i2c"; + reg = <0x40005c00 0x400>; + interrupts = <72>, + <73>;arch/arm/boot/dts/stm32f429.dtsi line 419
Quoted 10 lines
arch/arm/boot/dts/stm32f429.dtsi +7
-0+ resets = <&rcc STM32F4_APB1_RESET(I2C3)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(I2C3)>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + dac: dac@40007400 { compatible = "st,stm32f4-dac-core"; reg = <0x40007400 0x400>;
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel