<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="en-TW" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">On 08/06/2023 10:21, Billy Tsai wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> On 08/06/2023 09:47, Billy Tsai wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +allOf:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + - $ref: pwm.yaml#<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +properties:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + compatible:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + enum:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + - aspeed,ast2600-pwm<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + "#pwm-cells":<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + const: 3<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> > 3 cells? For one PWM? What are they?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> channel, period and polarity.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> > Don't cut my responses. You wrote you have one PWM output, so only one<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> > channel. What do you put then in the channel?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> You need to put 0 in the cell of the channel, the example of the dts usage will like following:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> pwm0: pwm0@1e610000 {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> compatible = "aspeed,ast2600-pwm";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> reg = <0x1e610000 0x8>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> #pwm-cells = <3>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> #address-cells = <1>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> #size-cells = <0>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> pinctrl-names = "default";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> pinctrl-0 = <&pinctrl_pwm0_default>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> clocks = <&syscon ASPEED_CLK_AHB>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> resets = <&syscon ASPEED_RESET_PWM>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> status = "okay";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> };<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> pwm1: pwm1@1e610010 {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> compatible = "aspeed,ast2600-pwm";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> reg = <0x1e610010 0x8>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> #pwm-cells = <3>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> #address-cells = <1>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> #size-cells = <0>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> pinctrl-names = "default";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> pinctrl-0 = <&pinctrl_pwm1_default>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> clocks = <&syscon ASPEED_CLK_AHB>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> resets = <&syscon ASPEED_RESET_PWM>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> status = "okay";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> > BTW, these are not two PWM devices but one. I don't understand why you<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> > changed previous design into something like this, but this is not<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> > representing your hardware.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The previous design of my patch treated our PWM controller as having 16 PWM channels.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">However, from a hardware perspective, it consists of 16 individual PWM chips, each
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">with its own set of two 4-byte control registers. These chips operate independently
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">and are not affected by each other.<o:p></o:p></span></p>
</div>
</div>
</body>
</html>