2022-04-22 06:01:32

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [EXT] Re: [PATCH 1/2 v4] dt-bindings: dspi: added for semtech sx1301

On 21/04/2022 11:11, Jerry Huang wrote:
> Please also answer Michael's comments.
>
> [Jerry Huang] I double checked the MikroBus devices, we used two MikcroBus devices:
> BLE P click: https://www.mikroe.com/ble-p-click
> BEE click: https://www.mikroe.com/bee-click
> Both of them are SPI interface connect to ls1028ardb through MiKcroBus interface.
> So the name "semtech sx1301" is not correct for this node.

I asked to remove the words "Devicetree bindings" and this was not finished.

Now you mention that entire name of device is wrong... It's confusing. I
don't know what device you are describing here. I expect you know. :)

What is this binding about exactly?

> How about "mikroe, spi-dev" or any suggestion about it?


Best regards,
Krzysztof


2022-04-22 19:19:46

by Michael Walle

[permalink] [raw]
Subject: Re: [EXT] Re: [PATCH 1/2 v4] dt-bindings: dspi: added for semtech sx1301

On 21/04/2022 11:11, Jerry Huang wrote:
>> Please also answer Michael's comments.
>>
>> [Jerry Huang] I double checked the MikroBus devices, we used two MikcroBus devices:
>> BLE P click: https://www.mikroe.com/ble-p-click
>> BEE click: https://www.mikroe.com/bee-click
>> Both of them are SPI interface connect to ls1028ardb through MiKcroBus interface.
>> So the name "semtech sx1301" is not correct for this node.
>
> I asked to remove the words "Devicetree bindings" and this was not finished.
>
> Now you mention that entire name of device is wrong... It's confusing. I
> don't know what device you are describing here. I expect you know. :)
>
> What is this binding about exactly?

I *think* it's just exposing the mikrobus connector as an spidev device.
There was a former attempt by Vladimir here [1]. Now as it the nature
of such a connector that you can connect a myriad of devices there, it
doesn't really make sense to have a just particular one described. What
happens if that one will switch from spidev to a real driver in the
kernel? So using "spidev" for the compatible would be the first reflex.
But as described in the spidev driver this is plain wrong (and also causes
a warning/info message it) because it should describe the actual hardware.

Thus I proposed to use DT overlays which are loaded according to what
is actually attached to the header, so a real driver could be loaded.

But there *could* be a sane default which then could be replaced in
an DT overlay. Like "mirkobus-socket" or similar, which might expose
spidev. Actually it is more than just SPI, there is GPIO and resets and
I2C. Maybe it should be an MFD? I don't know. But that is something for
the DT maintainers to decide if they'll allow such "generic" devices.

-michael

[1] https://lore.kernel.org/linux-devicetree/[email protected]/

2022-04-22 19:27:17

by Changming Huang

[permalink] [raw]
Subject: RE: [EXT] Re: [PATCH 1/2 v4] dt-bindings: dspi: added for semtech sx1301




Best Regards
Jerry Huang

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: 2022??4??21?? 17:18
To: Jerry Huang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Leo Li <[email protected]>; [email protected]
Subject: Re: [EXT] Re: [PATCH 1/2 v4] dt-bindings: dspi: added for semtech sx1301

Caution: EXT Email

On 21/04/2022 11:11, Jerry Huang wrote:
> Please also answer Michael's comments.
>
> [Jerry Huang] I double checked the MikroBus devices, we used two MikcroBus devices:
> BLE P click:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> mikroe.com%2Fble-p-click&amp;data=05%7C01%7Cjerry.huang%40nxp.com%7C0a
> 1869e140a74bdfdad108da2377d636%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%
> 7C0%7C637861294862753519%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdat
> a=%2FwswKJZxub37vxhjuDJ1iigspSPpb1U0kUQDxSaz5Yw%3D&amp;reserved=0
> BEE click:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> mikroe.com%2Fbee-click&amp;data=05%7C01%7Cjerry.huang%40nxp.com%7C0a18
> 69e140a74bdfdad108da2377d636%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C
> 0%7C637861294862753519%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJ
> QIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=
> bE7kpCsNBxoEumCJDbWif%2FX6Ya9px%2BGzWAqPTJ918QI%3D&amp;reserved=0
> Both of them are SPI interface connect to ls1028ardb through MiKcroBus interface.
> So the name "semtech sx1301" is not correct for this node.

I asked to remove the words "Devicetree bindings" and this was not finished.

Now you mention that entire name of device is wrong... It's confusing. I don't know what device you are describing here. I expect you know. :)

What is this binding about exactly?
[Jerry Huang]
I double checked the SPI device used on MikcroBus, which is not sx1301.
Now we have two MikcroBus click boards, BEE click and BLE P click, both of them have the SPI interface through MikcroBus.
So I can't use the previous name "semtech, sx1301".

> How about "mikroe, spi-dev" or any suggestion about it?


Best regards,
Krzysztof

2022-04-22 19:30:52

by Changming Huang

[permalink] [raw]
Subject: RE: [EXT] Re: [PATCH 1/2 v4] dt-bindings: dspi: added for semtech sx1301




Best Regards
Jerry Huang

-----Original Message-----
From: Michael Walle <[email protected]>
Sent: 2022??4??21?? 17:44
To: [email protected]
Cc: [email protected]; [email protected]; Jerry Huang <[email protected]>; [email protected]; Leo Li <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Vladimir Oltean <[email protected]>; Michael Walle <[email protected]>
Subject: Re: [EXT] Re: [PATCH 1/2 v4] dt-bindings: dspi: added for semtech sx1301

Caution: EXT Email

On 21/04/2022 11:11, Jerry Huang wrote:
>> Please also answer Michael's comments.
>>
>> [Jerry Huang] I double checked the MikroBus devices, we used two MikcroBus devices:
>> BLE P click:
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
>> .mikroe.com%2Fble-p-click&amp;data=05%7C01%7Cjerry.huang%40nxp.com%7C
>> 39106c035c374b5ec60608da237b883f%7C686ea1d3bc2b4c6fa92cd99c5c301635%7
>> C0%7C1%7C637861310738684479%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
>> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&amp
>> ;sdata=rsETzlFhfe2hyRAiQOL4KHAQ4vwh%2FFrYzroZ%2B0ccSMw%3D&amp;reserve
>> d=0 BEE click:
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
>> .mikroe.com%2Fbee-click&amp;data=05%7C01%7Cjerry.huang%40nxp.com%7C39
>> 106c035c374b5ec60608da237b883f%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0
>> %7C1%7C637861310738684479%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
>> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&amp;s
>> data=LEmwF46B9GYD%2BcpGoxpiGTnMgvTbLHP4IUirGR78A5U%3D&amp;reserved=0
>> Both of them are SPI interface connect to ls1028ardb through MiKcroBus interface.
>> So the name "semtech sx1301" is not correct for this node.
>
> I asked to remove the words "Devicetree bindings" and this was not finished.
>
> Now you mention that entire name of device is wrong... It's confusing.
> I don't know what device you are describing here. I expect you know.
> :)
>
> What is this binding about exactly?

I *think* it's just exposing the mikrobus connector as an spidev device.
There was a former attempt by Vladimir here [1]. Now as it the nature of such a connector that you can connect a myriad of devices there, it doesn't really make sense to have a just particular one described. What happens if that one will switch from spidev to a real driver in the kernel? So using "spidev" for the compatible would be the first reflex.
But as described in the spidev driver this is plain wrong (and also causes a warning/info message it) because it should describe the actual hardware.

Thus I proposed to use DT overlays which are loaded according to what is actually attached to the header, so a real driver could be loaded.

But there *could* be a sane default which then could be replaced in an DT overlay. Like "mirkobus-socket" or similar, which might expose spidev. Actually it is more than just SPI, there is GPIO and resets and I2C. Maybe it should be an MFD? I don't know. But that is something for the DT maintainers to decide if they'll allow such "generic" devices.

-michael

[Jerry Huang]
Thank a lot, Michael.
Yes, there are I2C, Uart (or GPIO) and SPI interface in MikcroBus socket.

Krzysztof,
How about
compatible = "mikcroe,mikcroe-socket"?
or how about Vladimir's patch?



[1] https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flinux-devicetree%2F20200318001603.9650-13-olteanv%40gmail.com%2F&amp;data=05%7C01%7Cjerry.huang%40nxp.com%7C39106c035c374b5ec60608da237b883f%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C637861310738684479%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&amp;sdata=Y166YDGSpEX0wtUQE8V7ql8atkb79BmG9Y5mXb8KWJM%3D&amp;reserved=0