Re: fusb302b driver: devicetree support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Doug,

On Mon, Jun 11, 2018 at 02:15:19PM -0400, dgilbert@xxxxxxxxxxxx wrote:
> Hi,
> I have a FUSB302B breakout board:
> 
> https://www.tindie.com/products/ReclaimerLabs/usb-type-c-power-delivery-phy-breakout-board/?pt=ac_prod_search
> 
> That is connected to a Acme Arietta module:
>   https://www.acmesystems.it/arietta
> based on the Atmel AT91SAM9G25 MCU which is well supported by the Linux
> kernel with its own ".dts" file. Currently I have lk 4.14.0 on the arietta
> and with some I2C pass-through code can see the FUSB302B (at slave address
> 0x22) and can send it 0x22 0x1 and get a sensible result:
>   # i2c_devtest -d 1 -s 22 -i 1 -r 16
>  91 03 20 31 60 24 00 02 06 00 01 00 0f 00 00 00
> 
> So I would like to use the fusb302b Linux driver which bears your email
> address:
>    MODULE_AUTHOR("Yueyao Zhu <yueyao.zhu@xxxxxxxxx>");
> 
> I like to work at the bleeding edge so I copied fusb302b.c from lk 4.17.0
> back to the staging fusb302 directory in lk 4.14.0 but it failed to compile
> due to the missing tcpm.h heading. So I guess  the tcpm sub-sub-system
> has been added to the mainline since then. That is not a show-stopper.

So why aren't you just using mainline?

> More serious is this comment in the driver:
> 
>          * Devicetree platforms should get extcon via phandle (not yet
>          * supported). On ACPI platforms, we get the name from a device prop.
>          * This device prop is for kernel internal use only and is expected
>          * to be set by the platform code which also registers the i2c client
>          * for the fusb302.

Note. This comment applies only to the optional extcon device which
AFAIK, is only used on one platform, and even on that platform I'm
not sure it's really needed.

> So phandle stuff is how (Atmel) device trees get to the GPIOs which is what
> I need.

What GPIOs? Which signals are we talking about? The irq?

Can you please explain what are you trying to do?

> Here is a device tree snippet for a closely related Atmel MCU so
> its hardware I2C can access an at24c02 serial eeprom.
> 
>                         i2c1: i2c@fc028000 {
>                                 dmas = <0>, <0>;
>                                 pinctrl-names = "default";
>                                 pinctrl-0 = <&pinctrl_i2c1_default>;
>                                 status = "okay";
> 
>                                 at24@54 {
>                                         compatible = "atmel,24c02";
>                                         reg = <0x54>;
>                                         pagesize = <16>;
>                                 };
>                         };
> 
> 
> I have some experience writing linux device drivers and can do some
> of the work required, and test it with the hardware described above.
> 
> Let us leave it there and I will wait for a response from you.

If I understood correctly, you just need help with the hardware
description, right? Unfortunately I'm not going to be able to help you
with that, my knowledge of device tree is quite limited, but I'm sure
someone else can.

> Doug Gilbert
> 
> cc-ed to folks associated with the tcpmi driver which I assume
> the FUSB302B (USB Type C PD 2.0 phy + controller) is compatible with.
> Please tell me if that is not the case.

+linux-usb ml

You always want to cc the list.


Br,

-- 
heikki
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux