<div dir="ltr"><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>On 6/7/23 23:21, Billy Tsai wrote:</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>> The code says:</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>> In Aspeed AST2600 SoC features 16 TACH controllers, with each</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>> controller capable of supporting up to 1 input.</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>> which is a bit different. I guess there are no examples anymore,</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>> but I'd really like to see how this looks like in the devicetree file,</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>> and how the driver is supposed to distinguish/select the 16 inputs.</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > > Hi Roeck,</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > > The node in the devicetree file will looks like following:</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > > tach0: tach0@1e610008 {</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>compatible = "aspeed,ast2600-tach";</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>reg = <0x1e610008 0x8>;</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>#address-cells = <1>;</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">    <span class="gmail-Apple-converted-space"> </span>   > > >         <span class="gmail-Apple-converted-space"> </span>#size-cells = <0>;</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>pinctrl-names = "default";</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>pinctrl-0 = <&pinctrl_tach0_default>;</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>clocks = <&syscon ASPEED_CLK_AHB>;</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>resets = <&syscon ASPEED_RESET_PWM>;</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > >         <span class="gmail-Apple-converted-space"> </span>status = "disabled";</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > > };</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > ><span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > Neither reg nor pinctrl is mentioned in the bindings. Maybe that is not needed nowadays,</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > but I find it confusing.</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > Either case, it is highly unusual that there would be 16 instances of this device</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> > instead of one. Why is this done ? It doesn't really make sense to me.</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> Having 16 instances of PWM and Tach is more compatible with our hardware design.<span class="gmail-Apple-converted-space"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> This is because our register layout for PWM and Tach is not continuous.</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> PWM0 used 0x0 0x4, Tach0 used 0x8 0xc</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> PWM1 used 0x10 0x14, Tach1 used 0x18 0x1c</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> ...</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">       <span class="gmail-Apple-converted-space"> </span>> Each PWM/Tach instance has its own controller register and is not dependent on others.</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Hi Guenter,</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Did you receive a response to my previous email?</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span lang="EN-US">I would like to inquire if you have any further concerns regarding the PWM and Tach with 16 instances.</span></p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Thanks</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Best Regards,</p><p class="MsoNormal" style="margin:0cm;font-size:10pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Billy Tsai</p></div>