* [PATCH] ASoC: dt-bindings: maxim,max98357a: Add compatible with richtek,rt9123
@ 2025-03-18 0:57 cy_huang
2025-03-18 8:55 ` Krzysztof Kozlowski
0 siblings, 1 reply; 6+ messages in thread
From: cy_huang @ 2025-03-18 0:57 UTC (permalink / raw)
To: Mark Brown, Krzysztof Kozlowski, Conor Dooley, Tzung-Bi Shih
Cc: Liam Girdwood, ChiYuan Huang, Otto Lin, Allen Lin, linux-sound,
devicetree, linux-kernel
From: ChiYuan Huang <cy_huang@richtek.com>
The hardware control and specification of 'richtek,rt9123' are similar
with max98357 or max98360. It's no need to add the new source code. So
make it compatible with one of them.
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
---
.../devicetree/bindings/sound/maxim,max98357a.yaml | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/maxim,max98357a.yaml b/Documentation/devicetree/bindings/sound/maxim,max98357a.yaml
index 83ba8666fbb4..5dc7e60b67d6 100644
--- a/Documentation/devicetree/bindings/sound/maxim,max98357a.yaml
+++ b/Documentation/devicetree/bindings/sound/maxim,max98357a.yaml
@@ -18,9 +18,14 @@ allOf:
properties:
compatible:
- enum:
- - maxim,max98357a
- - maxim,max98360a
+ oneOf:
+ - enum:
+ - maxim,max98357a
+ - maxim,max98360a
+ - items:
+ - enum:
+ - richtek,rt9123
+ - const: maxim,max98360a
'#sound-dai-cells':
const: 0
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: maxim,max98357a: Add compatible with richtek,rt9123
2025-03-18 0:57 [PATCH] ASoC: dt-bindings: maxim,max98357a: Add compatible with richtek,rt9123 cy_huang
@ 2025-03-18 8:55 ` Krzysztof Kozlowski
2025-03-18 11:26 ` ChiYuan Huang
0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-18 8:55 UTC (permalink / raw)
To: cy_huang
Cc: Mark Brown, Krzysztof Kozlowski, Conor Dooley, Tzung-Bi Shih,
Liam Girdwood, Otto Lin, Allen Lin, linux-sound, devicetree,
linux-kernel
On Tue, Mar 18, 2025 at 08:57:51AM +0800, cy_huang@richtek.com wrote:
> From: ChiYuan Huang <cy_huang@richtek.com>
>
> The hardware control and specification of 'richtek,rt9123' are similar
> with max98357 or max98360. It's no need to add the new source code. So
Are you sure? I looked at datasheet and do not see anything about
SD_MODE in RT9123. Also you have two supplies, while max98360a has only
one. You have I2C but max98360a has no.
These devices do not look compatible.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: maxim,max98357a: Add compatible with richtek,rt9123
2025-03-18 8:55 ` Krzysztof Kozlowski
@ 2025-03-18 11:26 ` ChiYuan Huang
2025-03-19 7:42 ` Krzysztof Kozlowski
0 siblings, 1 reply; 6+ messages in thread
From: ChiYuan Huang @ 2025-03-18 11:26 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Mark Brown, Krzysztof Kozlowski, Conor Dooley, Tzung-Bi Shih,
Liam Girdwood, Otto Lin, Allen Lin, linux-sound, devicetree,
linux-kernel
On Tue, Mar 18, 2025 at 09:55:48AM +0100, Krzysztof Kozlowski wrote:
> On Tue, Mar 18, 2025 at 08:57:51AM +0800, cy_huang@richtek.com wrote:
> > From: ChiYuan Huang <cy_huang@richtek.com>
> >
> > The hardware control and specification of 'richtek,rt9123' are similar
> > with max98357 or max98360. It's no need to add the new source code. So
>
> Are you sure? I looked at datasheet and do not see anything about
> SD_MODE in RT9123. Also you have two supplies, while max98360a has only
> one. You have I2C but max98360a has no.
>
Sure, consider the I2C mode. Then it seems different. For the power
supply, yes, we have one more supply and it's used for digital input
output reference. It will always tiled to SoC digital power domain.
It's no need to control, so I think DVDD can be ignored.
If not considering the I2C, and the DVDD power supply, for HW control
mode, then it looks the same including sample rate. One pin to turn on
the amplifier.
This IC is designed for 'easy to use'. For the normal condition, HW mode
will always be suggested to the customer.
May I have your suggestion? If it can not be compatible, should I write
two drivers, one platform driver for HW control mode, and another I2C driver
for I2C SW control mode?
Hope to get your feedback.
Sincerely,
ChiYuan Huang.
> These devices do not look compatible.
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: maxim,max98357a: Add compatible with richtek,rt9123
2025-03-18 11:26 ` ChiYuan Huang
@ 2025-03-19 7:42 ` Krzysztof Kozlowski
2025-03-19 8:21 ` ChiYuan Huang
0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-19 7:42 UTC (permalink / raw)
To: ChiYuan Huang
Cc: Mark Brown, Krzysztof Kozlowski, Conor Dooley, Tzung-Bi Shih,
Liam Girdwood, Otto Lin, Allen Lin, linux-sound, devicetree,
linux-kernel
On 18/03/2025 12:26, ChiYuan Huang wrote:
> On Tue, Mar 18, 2025 at 09:55:48AM +0100, Krzysztof Kozlowski wrote:
>> On Tue, Mar 18, 2025 at 08:57:51AM +0800, cy_huang@richtek.com wrote:
>>> From: ChiYuan Huang <cy_huang@richtek.com>
>>>
>>> The hardware control and specification of 'richtek,rt9123' are similar
>>> with max98357 or max98360. It's no need to add the new source code. So
>>
>> Are you sure? I looked at datasheet and do not see anything about
>> SD_MODE in RT9123. Also you have two supplies, while max98360a has only
>> one. You have I2C but max98360a has no.
>>
> Sure, consider the I2C mode. Then it seems different. For the power
> supply, yes, we have one more supply and it's used for digital input
> output reference. It will always tiled to SoC digital power domain.
> It's no need to control, so I think DVDD can be ignored.
>
> If not considering the I2C, and the DVDD power supply, for HW control
> mode, then it looks the same including sample rate. One pin to turn on
> the amplifier.
>
> This IC is designed for 'easy to use'. For the normal condition, HW mode
> will always be suggested to the customer.
>
> May I have your suggestion? If it can not be compatible, should I write
> two drivers, one platform driver for HW control mode, and another I2C driver
> for I2C SW control mode?
We don't talk about drivers here. I only commented that they are not
compatible based on datasheets, so compatibility should not be expressed
in the DT. Considering I2C, this should be in its own binding with full
device description (so for both HW mode and I2C).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: maxim,max98357a: Add compatible with richtek,rt9123
2025-03-19 7:42 ` Krzysztof Kozlowski
@ 2025-03-19 8:21 ` ChiYuan Huang
2025-03-19 8:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 6+ messages in thread
From: ChiYuan Huang @ 2025-03-19 8:21 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Mark Brown, Krzysztof Kozlowski, Conor Dooley, Tzung-Bi Shih,
Liam Girdwood, Otto Lin, Allen Lin, linux-sound, devicetree,
linux-kernel
On Wed, Mar 19, 2025 at 08:42:11AM +0100, Krzysztof Kozlowski wrote:
> On 18/03/2025 12:26, ChiYuan Huang wrote:
> > On Tue, Mar 18, 2025 at 09:55:48AM +0100, Krzysztof Kozlowski wrote:
> >> On Tue, Mar 18, 2025 at 08:57:51AM +0800, cy_huang@richtek.com wrote:
> >>> From: ChiYuan Huang <cy_huang@richtek.com>
> >>>
> >>> The hardware control and specification of 'richtek,rt9123' are similar
> >>> with max98357 or max98360. It's no need to add the new source code. So
> >>
> >> Are you sure? I looked at datasheet and do not see anything about
> >> SD_MODE in RT9123. Also you have two supplies, while max98360a has only
> >> one. You have I2C but max98360a has no.
> >>
> > Sure, consider the I2C mode. Then it seems different. For the power
> > supply, yes, we have one more supply and it's used for digital input
> > output reference. It will always tiled to SoC digital power domain.
> > It's no need to control, so I think DVDD can be ignored.
> >
> > If not considering the I2C, and the DVDD power supply, for HW control
> > mode, then it looks the same including sample rate. One pin to turn on
> > the amplifier.
> >
> > This IC is designed for 'easy to use'. For the normal condition, HW mode
> > will always be suggested to the customer.
> >
> > May I have your suggestion? If it can not be compatible, should I write
> > two drivers, one platform driver for HW control mode, and another I2C driver
> > for I2C SW control mode?
>
>
> We don't talk about drivers here. I only commented that they are not
> compatible based on datasheets, so compatibility should not be expressed
> in the DT. Considering I2C, this should be in its own binding with full
> device description (so for both HW mode and I2C).
>
Actually, These two mode cannot be coexixted. The HW or SW I2C mode is
detected on POR by different external resistor.
Just for the HW mode, all the controls, even sampling rate, supported
bitrate are all similiar with max98357 driver.
That's why I'm trying to treat it to be compatible.
For SW I2C, sure, I can write one for the dedicated usage. Under this
mode, all onoff sequences need to be controlled by RG.
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: maxim,max98357a: Add compatible with richtek,rt9123
2025-03-19 8:21 ` ChiYuan Huang
@ 2025-03-19 8:36 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-19 8:36 UTC (permalink / raw)
To: ChiYuan Huang
Cc: Mark Brown, Krzysztof Kozlowski, Conor Dooley, Tzung-Bi Shih,
Liam Girdwood, Otto Lin, Allen Lin, linux-sound, devicetree,
linux-kernel
On 19/03/2025 09:21, ChiYuan Huang wrote:
> On Wed, Mar 19, 2025 at 08:42:11AM +0100, Krzysztof Kozlowski wrote:
>> On 18/03/2025 12:26, ChiYuan Huang wrote:
>>> On Tue, Mar 18, 2025 at 09:55:48AM +0100, Krzysztof Kozlowski wrote:
>>>> On Tue, Mar 18, 2025 at 08:57:51AM +0800, cy_huang@richtek.com wrote:
>>>>> From: ChiYuan Huang <cy_huang@richtek.com>
>>>>>
>>>>> The hardware control and specification of 'richtek,rt9123' are similar
>>>>> with max98357 or max98360. It's no need to add the new source code. So
>>>>
>>>> Are you sure? I looked at datasheet and do not see anything about
>>>> SD_MODE in RT9123. Also you have two supplies, while max98360a has only
>>>> one. You have I2C but max98360a has no.
>>>>
>>> Sure, consider the I2C mode. Then it seems different. For the power
>>> supply, yes, we have one more supply and it's used for digital input
>>> output reference. It will always tiled to SoC digital power domain.
>>> It's no need to control, so I think DVDD can be ignored.
>>>
>>> If not considering the I2C, and the DVDD power supply, for HW control
>>> mode, then it looks the same including sample rate. One pin to turn on
>>> the amplifier.
>>>
>>> This IC is designed for 'easy to use'. For the normal condition, HW mode
>>> will always be suggested to the customer.
>>>
>>> May I have your suggestion? If it can not be compatible, should I write
>>> two drivers, one platform driver for HW control mode, and another I2C driver
>>> for I2C SW control mode?
>>
>>
>> We don't talk about drivers here. I only commented that they are not
>> compatible based on datasheets, so compatibility should not be expressed
>> in the DT. Considering I2C, this should be in its own binding with full
>> device description (so for both HW mode and I2C).
>>
> Actually, These two mode cannot be coexixted.
I did not claim that.
> The HW or SW I2C mode is
> detected on POR by different external resistor.
Not related to binding. Binding describes hardware and the chip does not
magically change its transistors based on external resistor, right?
>
> Just for the HW mode, all the controls, even sampling rate, supported
> bitrate are all similiar with max98357 driver.
>
> That's why I'm trying to treat it to be compatible.
>
> For SW I2C, sure, I can write one for the dedicated usage. Under this
> mode, all onoff sequences need to be controlled by RG.
Did you read my first sentence? We do not talk about drivers. What do
you want to write? Driver?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-03-19 8:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18 0:57 [PATCH] ASoC: dt-bindings: maxim,max98357a: Add compatible with richtek,rt9123 cy_huang
2025-03-18 8:55 ` Krzysztof Kozlowski
2025-03-18 11:26 ` ChiYuan Huang
2025-03-19 7:42 ` Krzysztof Kozlowski
2025-03-19 8:21 ` ChiYuan Huang
2025-03-19 8:36 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).