[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d0e05389-9bd1-92a9-9624-4e9ac02a6a52@ti.com>
Date: Wed, 7 Oct 2020 13:38:19 +0300
From: Peter Ujfalusi <peter.ujfalusi@...com>
To: Nishanth Menon <nm@...com>
CC: <t-kristo@...com>, <linux-kernel@...r.kernel.org>,
<devicetree@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <robh+dt@...nel.org>
Subject: Re: [PATCH] arm64: dts: ti: k3-j7200-main: Add McASP nodes
On 05/10/2020 15.08, Nishanth Menon wrote:
> On 15:02-20201005, Peter Ujfalusi wrote:
>>
>>
>> On 05/10/2020 14.58, Nishanth Menon wrote:
>>> On 10:48-20201005, Peter Ujfalusi wrote:
>>>> Add the nodes for McASP 0-2 and keep them disabled because several
>>>> required properties are not present as they are board specific.
>>>>
>>>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
>>>> ---
>>>> arch/arm64/boot/dts/ti/k3-j7200-main.dtsi | 57 +++++++++++++++++++++++
>>>> 1 file changed, 57 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi
>>>> index 72d6496e88dd..cc6c2a81887a 100644
>>>> --- a/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi
>>>> +++ b/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi
>>>> @@ -446,4 +446,61 @@ usb0: usb@...0000 {
>>>> dr_mode = "otg";
>>>> };
>>>> };
>>>> +x
>>>> + mcasp0: mcasp@...00000 {
>>>> + compatible = "ti,am33xx-mcasp-audio";
>>>> + reg = <0x0 0x02b00000 0x0 0x2000>,
>>>> + <0x0 0x02b08000 0x0 0x1000>;
>>>> + reg-names = "mpu","dat";
>>>> + interrupts = <GIC_SPI 544 IRQ_TYPE_LEVEL_HIGH>,
>>>> + <GIC_SPI 545 IRQ_TYPE_LEVEL_HIGH>;
>>>> + interrupt-names = "tx", "rx";
>>>> +
>>>> + dmas = <&main_udmap 0xc400>, <&main_udmap 0x4400>;
>>>> + dma-names = "tx", "rx";
>>>> +
>>>> + clocks = <&k3_clks 174 40>;
>>>> + clock-names = "fck";
>>>> + power-domains = <&k3_pds 174 TI_SCI_PD_EXCLUSIVE>;
>>>> +
>>>> + status = "disabled";
>>>
>>> I see that there is inconsistent usage of "disabled" in our SoC.dts
>>>
>>> Our generic rule has been set them to disabled in board.dtsi
>>> McASP and DSS for existing SoC dts do not follow this.. which is a tad
>>> confusing.. (considering that not even all uarts come out on every board
>>> and every uart needs pinmux to function..)
>>
>> "keep them disabled because several required properties are not present
>> as they are board specific."
>>
>> In board file the enabled mcasp must be updated with options that is
>> required for operation. Without those option the McASP can not be
>> initialized.
>>
>> I think we have been revisiting the very same discussion every time we
>> have a new SoC with McASP...
>>
>
> Yep.. This doe'snt really follow the rest of the SoC definition. [1]
> came to mind. The McASP discussion is a variation in the debate of the
> same.
Right, saying status = "okay" to a node which is missing required
properties (which can only be added by boards when the McASP is
connected up) does not sound a good solution.
How should the SW handle that? Fail the device probe and return with
-EINVAL or eat up the error and just probe with broken configuration.
Since the peripheral is not used, the broken configuration will not
cause much runtime errors as there will be no runtime use of the peripheral.
status of fail or fail-sss is not a good one either, their definition is:
"Indicates that the device is not operational. A serious error was
detected in the device, and it is unlikely to become operational without
repair."
The peripheral is fine, we are just trying to enable it without
providing the needed properties.
> I'd argue Serdes, or for that matter any IP that has a link to
> outside-the-SoC world has the same discussion point.
status = "disabled" is still the closest thing for everything which have
external dependencies. There is not much point to enable an i2c bus
without making sure that the signals are actually routed to the pins
where they supposed to go.
Or from other pow: a board design is not based on what is _not_
connected to outside world, but you actually _connect_ or _enable_
certain peripherals to external components, connectors.
> [1] https://patchwork.kernel.org/patch/9304575/
>
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists