<div dir="ltr"><div>Hi Alexandre,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Alexandre Torgue <<a href="mailto:alexandre.torgue@st.com">alexandre.torgue@st.com</a>> 于2020年4月30日周四 下午7:45写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 4/30/20 12:26 PM, dillon min wrote:<br>
> Hi Alexandre,<br>
> <br>
> Alexandre Torgue <<a href="mailto:alexandre.torgue@st.com" target="_blank">alexandre.torgue@st.com</a> <br>
> <mailto:<a href="mailto:alexandre.torgue@st.com" target="_blank">alexandre.torgue@st.com</a>>> 于2020年4月30日周四 下午5:57写道:<br>
> <br>
>     Hi<br>
> <br>
>     On 4/30/20 11:43 AM, <a href="mailto:dillon.minfei@gmail.com" target="_blank">dillon.minfei@gmail.com</a><br>
>     <mailto:<a href="mailto:dillon.minfei@gmail.com" target="_blank">dillon.minfei@gmail.com</a>> wrote:<br>
>      > From: dillon min <<a href="mailto:dillon.minfei@gmail.com" target="_blank">dillon.minfei@gmail.com</a><br>
>     <mailto:<a href="mailto:dillon.minfei@gmail.com" target="_blank">dillon.minfei@gmail.com</a>>><br>
>      ><br>
>      > Signed-off-by: dillon min <<a href="mailto:dillon.minfei@gmail.com" target="_blank">dillon.minfei@gmail.com</a><br>
>     <mailto:<a href="mailto:dillon.minfei@gmail.com" target="_blank">dillon.minfei@gmail.com</a>>><br>
> <br>
>     Commit title should be ARM: dts: stm32: bla bla on stm32f429 and please<br>
>     a commit message.<br>
> <br>
> <br>
> *okay, thanks for your quicky response, this is my first kernel pull <br>
> request, i will resubmit all patchsets following the history submits <br>
> style who was did.*<br>
<br>
ok no pb. In general way you have to execute ./scripts/<a href="http://checkpatch.pl" rel="noreferrer" target="_blank">checkpatch.pl</a> to <br>
check some style errors before sending. Use ./scripts/<a href="http://get_maintainer.pl" rel="noreferrer" target="_blank">get_maintainer.pl</a> <br>
to see to who you have to send the patch. When you have several patches <br>
in a series, you need to have a cover-letter which explains the aim of <br>
your series. To have an idea of commit format just use git log on the <br>
file changed to see how previous accepted commi have been written.<br>
<br>
More details here: Documentation/process/submitting-patches.rst<br>
<br></blockquote><div>okay, thanks alexandre, i will go through these docs. currently i'm on may day holiday,  will be back at  next wensday. </div><div>after go back to work. i will separate this patch to five part with 9 patchs , should be more clear</div><div><br></div><div>dts releated</div><div>    1,  ARM: dts: stm32: Add i2c3 node for stm32f429</div><div>    2,  ARM: dts: stm32: Add drm panel ili9341 nodes connect to ldtc support for stm32f429-disco board</div><div>    3,  ARM: dts: stm32: Add stmpe811 touch screen support for stm32f429-disco board</div><div>    4,  ARM: dts: stm32: Add l3gd20 gyroscope sensor support for stm32f429-disco board</div><div><br></div><div>clk releated</div><div>    1, clk: stm32: Fix ltdc loading hang in set clk rate, pll_hw set to clks[PLL_VCO_SAI] but not clks[PLL_SAI]</div><div>    2, clk: stm32: Add CLK_IGNORE_UNUSED flags for ltdc, make sure ltdc clk not be released after system startup</div><div><br></div><div>spi releated</div><div>    1, spi: stm32: Add transfer mode SPI_SIMPLE_RX, SPI_3WIRE_RX support for stm32f4</div><div><br></div><div>drm releated</div><div>    1, drm/panel: Add panel driver ilitek-ili9341 </div><div><br></div><div>doc releated</div><div>     1, dt-bindings: display: panel: Add binding document for Ilitek Ili9341</div><div><br></div><div>TODO:</div><div>ltdc was verified by fbcon+logo, uname -a > /dev/tty0 , need more time to write test code with libdrm to verify osd</div><div>stmpe811 need cross compile tslib to do touch screen calibration</div><div>l3gd20 was tested by read data from /sys/bus/iio, need cross compile libiio to be verified by application with libiio</div><div>add dma2d to ltdc driver to speed up graphic render</div><div>dcmi camera with ov5640, the sdram might be not enough to support this. currently after zImage load to sdram,</div><div>just leave less than 2M bytes for application.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
>      > ---<br>
>      >   .../bindings/display/panel/ilitek,ili9341.txt      | 42 +++++++++++<br>
>      >   arch/arm/boot/dts/stm32f4-pinctrl.dtsi             | 79<br>
>     +++++++++++++++++++<br>
>      >   arch/arm/boot/dts/stm32f429-disco.dts              | 88<br>
>     ++++++++++++++++++++++<br>
>      >   arch/arm/boot/dts/stm32f429.dtsi                   | 12 +++<br>
>      >   4 files changed, 221 insertions(+)<br>
>      >   create mode 100644<br>
>     Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt<br>
>      ><br>
>      > diff --git<br>
>     a/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt<br>
>     b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt<br>
> <br>
>     This binding description should be in a separate patch and you have to<br>
>     write in YAML format.<br>
> <br>
> *okay, will do it later. *<br>
> <br>
> <br>
>      > new file mode 100644<br>
>      > index 0000000..f5a4e55<br>
>      > --- /dev/null<br>
>      > +++<br>
>     b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt<br>
>      > @@ -0,0 +1,42 @@<br>
>      > +Ilitek ILI9341 TFT panel driver with SPI control bus<br>
>      > +<br>
>      > +This is a driver for 240x320 TFT panels, accepting a rgb input<br>
>      > +streams that get adapted and scaled to the panel.<br>
>      > +<br>
>      > +Required properties:<br>
>      > +  - compatible: "stm32f429-disco,ltdc-panel", "ilitek,ili9341"<br>
>      > +    (full system-specific compatible is always required to look<br>
>     up configuration)<br>
>      > +  - reg: address of the panel on the SPI bus<br>
>      > +<br>
>      > +Optional properties:<br>
>      > +  - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt<br>
>      > +  - dc-gpios: a GPIO spec for the dc pin, see gpio/gpio.txt<br>
>      > +<br>
>      > +  The following optional properties only apply to RGB input mode:<br>
>      > +<br>
>      > +  - pixelclk-active: see display/panel/display-timing.txt<br>
>      > +  - de-active: see display/panel/display-timing.txt<br>
>      > +  - hsync-active: see display/panel/display-timing.txt<br>
>      > +  - vsync-active: see display/panel/display-timing.txt<br>
>      > +<br>
>      > +The panel must obey the rules for a SPI slave device as specified in<br>
>      > +spi/spi-bus.txt<br>
>      > +<br>
>      > +The device node can contain one 'port' child node with one child<br>
>      > +'endpoint' node, according to the bindings defined in<br>
>      > +media/video-interfaces.txt. This node should describe panel's<br>
>     video bus.<br>
>      > +<br>
>      > +Example:<br>
>      > +<br>
>      > +panel: display@0 {<br>
>      > +     compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341";<br>
>      > +     reg = <0>;<br>
>      > +     spi-3wire;<br>
>      > +     spi-max-frequency = <10000000>;<br>
>      > +     dc-gpios = <&gpiod 13 0>;<br>
>      > +     port {<br>
>      > +             panel_in: endpoint {<br>
>      > +                     remote-endpoint = <&display_out>;<br>
>      > +             };<br>
>      > +     };<br>
>      > +};<br>
>      > diff --git a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi<br>
>     b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi<br>
>      > index 392fa14..45b68f4 100644<br>
>      > --- a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi<br>
>      > +++ b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi<br>
>      > @@ -316,6 +316,85 @@<br>
>      >                               };<br>
>      >                       };<br>
>      ><br>
>      > +                     ltdc_pins_f429_disco: ltdc-1 {<br>
>      > +                             pins {<br>
>      > +                                     pinmux = <STM32_PINMUX('C',<br>
>     6,  AF14)>,<br>
>      > +                                             /* LCD_HSYNC */<br>
>      > +                                              <STM32_PINMUX('A',<br>
>     4,  AF14)>,<br>
>      > +                                              /* LCD_VSYNC */<br>
>      > +                                              <STM32_PINMUX('G',<br>
>     7,  AF14)>,<br>
>      > +                                              /* LCD_CLK */<br>
>      > +                                              <STM32_PINMUX('C',<br>
>     10, AF14)>,<br>
>      > +                                              /* LCD_R2 */<br>
>      > +                                              <STM32_PINMUX('B',<br>
>     0,  AF9)>,<br>
>      > +                                              /* LCD_R3 */<br>
>      > +                                              <STM32_PINMUX('A',<br>
>     11, AF14)>,<br>
>      > +                                              /* LCD_R4 */<br>
>      > +                                              <STM32_PINMUX('A',<br>
>     12, AF14)>,<br>
>      > +                                              /* LCD_R5 */<br>
>      > +                                              <STM32_PINMUX('B',<br>
>     1,  AF9)>,<br>
>      > +                                              /* LCD_R6*/<br>
>      > +                                              <STM32_PINMUX('G',<br>
>     6,  AF14)>,<br>
>      > +                                              /* LCD_R7 */<br>
>      > +                                              <STM32_PINMUX('A',<br>
>     6,  AF14)>,<br>
>      > +                                              /* LCD_G2 */<br>
>      > +                                              <STM32_PINMUX('G',<br>
>     10, AF9)>,<br>
>      > +                                              /* LCD_G3 */<br>
>      > +                                              <STM32_PINMUX('B',<br>
>     10, AF14)>,<br>
>      > +                                              /* LCD_G4 */<br>
>      > +                                              <STM32_PINMUX('D',<br>
>     6,  AF14)>,<br>
>      > +                                              /* LCD_B2 */<br>
>      > +                                              <STM32_PINMUX('G',<br>
>     11, AF14)>,<br>
>      > +                                              /* LCD_B3*/<br>
>      > +                                              <STM32_PINMUX('B',<br>
>     11, AF14)>,<br>
>      > +                                              /* LCD_G5 */<br>
>      > +                                              <STM32_PINMUX('C',<br>
>     7,  AF14)>,<br>
>      > +                                              /* LCD_G6 */<br>
>      > +                                              <STM32_PINMUX('D',<br>
>     3,  AF14)>,<br>
>      > +                                              /* LCD_G7 */<br>
>      > +                                              <STM32_PINMUX('G',<br>
>     12, AF9)>,<br>
>      > +                                              /* LCD_B4 */<br>
>      > +                                              <STM32_PINMUX('A',<br>
>     3,  AF14)>,<br>
>      > +                                              /* LCD_B5 */<br>
>      > +                                              <STM32_PINMUX('B',<br>
>     8,  AF14)>,<br>
>      > +                                              /* LCD_B6 */<br>
>      > +                                              <STM32_PINMUX('B',<br>
>     9,  AF14)>,<br>
>      > +                                              /* LCD_B7 */<br>
>      > +                                              <STM32_PINMUX('F',<br>
>     10, AF14)>;<br>
>      > +                                              /* LCD_DE */<br>
>      > +                                     slew-rate = <2>;<br>
>      > +                             };<br>
>      > +                     };<br>
>      > +<br>
>      > +                     i2c3_pins: i2c3-0 {<br>
>      > +                             pins {<br>
>      > +                                     pinmux = <STM32_PINMUX('C',<br>
>     9, AF4)>,<br>
>      > +                                             /* I2C3_SDA */<br>
>      > +                                              <STM32_PINMUX('A',<br>
>     8, AF4)>;<br>
>      > +                                             /* I2C3_SCL */<br>
>      > +                                     bias-disable;<br>
>      > +                                     drive-open-drain;<br>
>      > +                                     slew-rate = <3>;<br>
>      > +                             };<br>
>      > +                     };<br>
>      > +<br>
>      > +                     spi5_pins: spi5-0 {<br>
>      > +                             pins1 {<br>
>      > +                                     pinmux = <STM32_PINMUX('F',<br>
>     7, AF5)>,<br>
>      > +                                             /* SPI5_CLK */<br>
>      > +                                              <STM32_PINMUX('F',<br>
>     9, AF5)>;<br>
>      > +                                             /* SPI5_MOSI */<br>
>      > +                                     bias-disable;<br>
>      > +                                     drive-push-pull;<br>
>      > +                                     slew-rate = <0>;<br>
>      > +                             };<br>
>      > +                             pins2 {<br>
>      > +                                     pinmux = <STM32_PINMUX('F',<br>
>     8, AF5)>;<br>
>      > +                                             /* SPI5_MISO */<br>
>      > +                                     bias-disable;<br>
>      > +                             };<br>
>      > +                     };<br>
>      > +<br>
>      >                       dcmi_pins: dcmi-0 {<br>
>      >                               pins {<br>
>      >                                       pinmux = <STM32_PINMUX('A',<br>
>     4, AF13)>, /* DCMI_HSYNC */<br>
>      > diff --git a/arch/arm/boot/dts/stm32f429-disco.dts<br>
>     b/arch/arm/boot/dts/stm32f429-disco.dts<br>
>      > index 30c0f67..55eed05 100644<br>
>      > --- a/arch/arm/boot/dts/stm32f429-disco.dts<br>
>      > +++ b/arch/arm/boot/dts/stm32f429-disco.dts<br>
>      > @@ -49,6 +49,8 @@<br>
>      >   #include "stm32f429.dtsi"<br>
>      >   #include "stm32f429-pinctrl.dtsi"<br>
>      >   #include <dt-bindings/input/input.h><br>
>      > +#include <dt-bindings/interrupt-controller/irq.h><br>
>      > +#include <dt-bindings/gpio/gpio.h><br>
>      ><br>
>      >   / {<br>
>      >       model = "STMicroelectronics STM32F429i-DISCO board";<br>
>      > @@ -98,6 +100,14 @@<br>
>      >               regulator-name = "vcc5_host1";<br>
>      >               regulator-always-on;<br>
>      >       };<br>
>      > +<br>
>      > +     reg_3p3v: regulator-3p3v {<br>
> <br>
>     3p3 ?<br>
> <br>
> <br>
> *yes, the mfd stmpe driver need vcc & vio regulator, st sensor core <br>
> driver need vddio & vdd*<br>
<br>
I talked about the name. Somthing vdd_3v3 would be better. See how it is <br>
done in other stm32fx platform<br>
<br></blockquote><div>Okay, will change to vdd_3v3</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
>      > +             compatible = "regulator-fixed";<br>
>      > +             regulator-name = "3P3V";<br>
>      > +             regulator-min-microvolt = <3300000>;<br>
>      > +             regulator-max-microvolt = <3300000>;<br>
>      > +             regulator-always-on;<br>
>      > +     };<br>
>      >   };<br>
>      ><br>
>      >   &clk_hse {<br>
>      > @@ -127,3 +137,81 @@<br>
>      >       pinctrl-names = "default";<br>
>      >       status = "okay";<br>
>      >   };<br>
>      > +<br>
>      > +&ltdc {<br>
>      > +     status = "okay";<br>
>      > +     pinctrl-0 = <&ltdc_pins_f429_disco>;<br>
>      > +     pinctrl-names = "default";<br>
>      > +<br>
>      > +     port {<br>
>      > +             ltdc_out_rgb: endpoint {<br>
>      > +                     remote-endpoint = <&panel_in_rgb>;<br>
>      > +             };<br>
>      > +     };<br>
>      > +};<br>
>      > +<br>
>      > +&spi5 {<br>
>      > +     status = "okay";<br>
>      > +     pinctrl-0 = <&spi5_pins>;<br>
>      > +     pinctrl-names = "default";<br>
>      > +     #address-cells = <1>;<br>
>      > +     #size-cells = <0>;<br>
>      > +     cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>,<&gpioc 2<br>
>     GPIO_ACTIVE_LOW>;<br>
>      > +     dmas = <&dma2 3 2 0x400 0x0>,<br>
>      > +            <&dma2 4 2 0x400 0x0>;<br>
>      > +     dma-names = "rx", "tx";<br>
>      > +     l3gd20: l3gd20@0 {<br>
>      > +             compatible = "st,l3gd20-gyro";<br>
>      > +             spi-max-frequency = <10000000>;<br>
>      > +             st,drdy-int-pin = <2>;<br>
>      > +             interrupt-parent = <&gpioa>;<br>
>      > +             interrupts = <1 IRQ_TYPE_EDGE_RISING>,<br>
>      > +                             <2 IRQ_TYPE_EDGE_RISING>;<br>
>      > +             reg = <0>;<br>
>      > +             vddio = <&reg_3p3v>;<br>
>      > +             vdd = <&reg_3p3v>;<br>
>      > +             status = "okay";<br>
>      > +     };<br>
>      > +     display: display@1{<br>
>      > +             /* Connect panel-ilitek-9341 to ltdc */<br>
>      > +             compatible = "stm32f429-disco,ltdc-panel",<br>
>     "ilitek,ili9341";<br>
>      > +             reg = <1>;<br>
>      > +             spi-3wire;<br>
>      > +             spi-max-frequency = <10000000>;<br>
>      > +             dc-gpios = <&gpiod 13 0>;<br>
>      > +             port {<br>
>      > +                     panel_in_rgb: endpoint {<br>
>      > +                     remote-endpoint = <&ltdc_out_rgb>;<br>
>      > +                     };<br>
>      > +             };<br>
>      > +     };<br>
>      > +};<br>
>      > +<br>
>      > +&i2c3 {<br>
> <br>
>     Nodes are have to be ordered<br>
> <br>
> *sorry, a little confused, i2c-3 is used by stmpe811 driver*<br></blockquote><div> please give more information here, thanks. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> <br>
>      > +     pinctrl-names = "default";<br>
>      > +     pinctrl-0 = <&i2c3_pins>;<br>
>      > +     status = "okay";<br>
>      > +<br>
>      > +     touch: stmpe811@41 {<br>
>      > +             compatible = "st,stmpe811";<br>
>      > +             reg = <0x41>;<br>
>      > +             interrupts = <15 IRQ_TYPE_EDGE_FALLING>;<br>
>      > +             interrupt-parent = <&gpioa>;<br>
>      > +             vio = <&reg_3p3v>;<br>
>      > +             vcc = <&reg_3p3v>;<br>
>      > +             status = "okay";<br>
>      > +<br>
>      > +             stmpe_touchscreen {<br>
>      > +                     compatible = "st,stmpe-ts";<br>
>      > +                     st,sample-time = <4>;<br>
>      > +                     st,mod-12b = <1>;<br>
>      > +                     st,ref-sel = <0>;<br>
>      > +                     st,adc-freq = <1>;<br>
>      > +                     st,ave-ctrl = <1>;<br>
>      > +                     st,touch-det-delay = <2>;<br>
>      > +                     st,settling = <2>;<br>
>      > +                     st,fraction-z = <7>;<br>
>      > +                     st,i-drive = <1>;<br>
>      > +             };<br>
>      > +     };<br>
>      > +};<br>
>      > diff --git a/arch/arm/boot/dts/stm32f429.dtsi<br>
>     b/arch/arm/boot/dts/stm32f429.dtsi<br>
>      > index d777069..257b843 100644<br>
>      > --- a/arch/arm/boot/dts/stm32f429.dtsi<br>
>      > +++ b/arch/arm/boot/dts/stm32f429.dtsi<br>
>      > @@ -402,6 +402,18 @@<br>
> <br>
>     Split Soc updates in a separate patch<br>
> <br>
> *okay, will do it later*<br>
> <br>
>      >                       status = "disabled";<br>
>      >               };<br>
>      ><br>
>      > +             i2c3: i2c@40005c00 {<br>
>      > +                     compatible = "st,stm32f4-i2c";<br>
>      > +                     reg = <0x40005c00 0x400>;<br>
>      > +                     interrupts = <72>,<br>
>      > +                                  <73>;<br>
>      > +                     resets = <&rcc STM32F4_APB1_RESET(I2C3)>;<br>
>      > +                     clocks = <&rcc 0 STM32F4_APB1_CLOCK(I2C3)>;<br>
>      > +                     #address-cells = <1>;<br>
>      > +                     #size-cells = <0>;<br>
>      > +                     status = "disabled";<br>
>      > +             };<br>
>      > +<br>
>      >               dac: dac@40007400 {<br>
>      >                       compatible = "st,stm32f4-dac-core";<br>
>      >                       reg = <0x40007400 0x400>;<br>
>      ><br>
> <br>
</blockquote></div></div>