lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d231b7e2-51f5-4676-8fc0-e4bc6154e2d7@quicinc.com>
Date: Thu, 28 Dec 2023 15:38:05 +0800
From: Jie Luo <quic_luoj@...cinc.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, <agross@...nel.org>,
        <andersson@...nel.org>, <konrad.dybcio@...aro.org>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <robh+dt@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
        <andrew@...n.ch>, <hkallweit1@...il.com>, <linux@...linux.org.uk>,
        <robert.marko@...tura.hr>
CC: <linux-arm-msm@...r.kernel.org>, <netdev@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <quic_srichara@...cinc.com>
Subject: Re: [PATCH v4 5/5] dt-bindings: net: ipq4019-mdio: Document ipq5332
 platform



On 12/26/2023 9:18 PM, Krzysztof Kozlowski wrote:
> On 26/12/2023 14:06, Jie Luo wrote:
>>
>>>
>>>
>>>>
>>>>>
>>>>>> +      the platform IPQ50xx/IPQ5332.
>>>>>
>>>>> So these are valid for all platforms or not? Looks not, but nothing
>>>>> narrows the list for other boards.
>>>>
>>>> i add the limitation on the reg usage for the ipq5332 platform on the
>>>> following part "if condition" of this patch, i will update the patch
>>>> to narrow down for the other compatibles.
>>>>
>>>>>
>>>>> Anyway, why do you add entries in the middle? LDO was the second, so it
>>>>> cannot be now fifth.
>>>>
>>>> As Rob's suggestion, i move the cmn_blk to second location for
>>>> simplifying the limitation description, i checked the upstream dts code,
>>>> the LDO is not used currently, so we can move cmn_blk to the second
>>>> location here.
>>>
>>> I cannot find his suggestion in the previous thread. Where did he
>>> propose it?
>>
>> Rob suggested this on the V2 as below.
>> "
>> Perhaps cmn_blk should come 2nd, so all the variants have the same entry
>> indices. Then you can move this to the top level and just say 'minItems:
>> 4' here.
> 
> Wasn't this for new devices? What about all existing which have LDO as
> the second entry?

In the current regs, which includes mdio and one LDO.
mdio is the reg address range for all IPQs.
one LDO is only for ipq5018.

the new added LDO is for ipq5332.
the cmn_blk is for ipq9574 and ipq5332.

i will update these limitations of dt-bindings in the next patch set.

> 
>>>>>> +  qcom,cmn-ref-clock-frequency:
>>>>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>>>>> +    enum:
>>>>>> +      - 25000000
>>>>>> +      - 31250000
>>>>>> +      - 40000000
>>>>>> +      - 48000000
>>>>>> +      - 50000000
>>>>>> +      - 96000000
>>>>>> +    default: 48000000
>>>>>> +    description: |
>>>>>> +      The reference clock source of CMN PLL block is selectable, the
>>>>>> +      reference clock source can be from wifi module or the external
>>>>>> +      xtal, the reference clock frequency 48MHZ can be from internal
>>>>>> +      wifi or the external xtal, if absent, the internal 48MHZ is used,
>>>>>> +      if the 48MHZ is specified, which means the external 48Mhz is used.
>>>>>
>>>>> This does not resolve mine and Conor's concerns from previous version.
>>>>> External clocks are defined as clock inputs.
>>>>
>>>> No matter the external or internal reference clock, they are the clock
>>>> source selection for CMN, there are only 48MHZ can be external or
>>>> internal, other clocks have the different clock rate, so the internal
>>>> 48MHZ reference clock can be implied when the
>>>> "qcom,cmn-ref-clock-frequency" is not defined, which is suggested by
>>>> Conor in the previous
>>>> comments.
>>>
>>> I don't think he proposed it, but maybe I missed some message (care to
>>> point me to his message where he agreed on usage of
>>> qcom,cmn-ref-clock-frequency?). I am pretty sure we both stayed on the
>>> same page, that the presence of clocks defines choice of internal clock.
>>> This property should go away.
>>
>> Sorry for this confusion.
>> Rob said the internal reference source can be decided by the absence of
>> the property combined with compatible string, because i said the
> 
> So all your three DT maintainers agree that lack of property for
> choosing clock, defines the usage of interrupt source.

This is the reference clock source selection of CMN block, which
generates the clocks for the Ethernet devices.

> 
> Now we had huge amount of arguments that you do not represent properly
> the clock relationships. Still.

here is the clock topology.
reference clock sources ---> CMN PLL ---> various output clocks

the output clocks are provided to the Ethernet devices(such as the
qca808x PHY devices).

These information is also provided the commit message of the patch
<net: mdio: ipq4019: configure CMN PLL clock for ipq5332>.

> 
>> internal 96MHZ is used on ipq5018 currently in the previous message.
>>
>> per double checked the current IPQ platforms, the internal 96MHZ is also
>> possible on ipq9574, and the reference clock source should be kept as
>> configurable instead of limited by the compatible string, maybe the
>> different reference clock source is acquired in the future, even
>> currently it is not used on the special platform for now.
>>
>> so i update the solution with a little bit of changes.
> 
> You still do not want to implement our suggestions and I don't
> understand your arguments. Nothing in above paragraph explains me why
> you cannot use clock provider/consumer relationships.

Hi Krzysztof,

The reference clock source can be registered as the fix clock provider,
 From the current fix clock provider, the clock rate is useful for the
clock consumer, the fix clock rate is used to generate the output clocks
by the divider or multiplier.

For the CMN block to select reference clock, which is configuring the
clock source, we don't know the formula to get the output clock value
based on the reference clock value.

i also see there is an example in the upstream code, which is same as
the CMN block to select the reference clock source.

the property "ref-clock-frequency" is defined in the yaml file below.
Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml.
"
ref-clock-frequency: 

     $ref: /schemas/types.yaml#/definitions/uint32 

     description: Reference clock frequency.
"

the reference clock source is selected based on the table as below.
source code file drivers/net/wireless/ti/wl12xx/main.c
"
static const struct wl12xx_clock wl12xx_refclock_table[] = { 

         { 19200000,     false,  WL12XX_REFCLOCK_19      }, 

         { 26000000,     false,  WL12XX_REFCLOCK_26      }, 

         { 26000000,     true,   WL12XX_REFCLOCK_26_XTAL }, 

         { 38400000,     false,  WL12XX_REFCLOCK_38      }, 

         { 38400000,     true,   WL12XX_REFCLOCK_38_XTAL }, 

         { 52000000,     false,  WL12XX_REFCLOCK_52      }, 

         { 0,            false,  0 } 

};
"
Thanks.
> 
> 
> Best regards,
> Krzysztof
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ