RE: Raspberry compute module does not find ttySC0 and ttySC1 with SC16IS752

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

 



----- Original Message -----
From: Juan García Pastor [mailto:jgp@xxxxxxxxxxxxx]
To: 'Maarten Brock' [mailto:m.brock@xxxxxxxxxxxxx]
Cc: linux-serial@xxxxxxxxxxxxxxx
Sent: Fri, 29 Apr 2016 16:32:09 +0200
Subject: RE: Raspberry compute module does not find ttySC0 and ttySC1 with SC16IS752 


> Dear Maarten,
> 
> Thanks for your support.
> 
> Following your comment, I have found some different ways to configure the
> "interrupt" parameters in .dts file:
> 
> interrupt-parent = <&gpio3>;

I don't think this is correct. gpio3 is no interrupt controller. But gpio is:

interrupt-parent = <&gpio>;

> interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
> # OR
> interrupts = <255 2>; /* high-to-low edge triggered */
> # OR
> interrupts = <23 0x2>; /* falling edge */

IRQ_TYPE_EDGE_FALLING doesn't seem to work in a device tree overlay.

> I understand the interrupt signal from sc16is752 is cabled to GPIO3 in the
> Raspberry.

If the interrupt line from the SC16IS752 is connected to gpio3 the first
number must be 3:

interrupts = <3 2>; /* falling edge */

Whether you use hexadecimal notation or not is up to you.

> About parameter "interrupts", do you have any information about the possible
> values to take and what do they mean? Is there a reference manual where this
> information is available?
> 
> The fact that the ttySC0 and ttySC1 devices are not displayed in
> Raspberry´s /dev folder let me think that something else in .dts file is
> not properly settled. As far as I know, the i2c communication is initiated
> by the master device (Raspberry), so no interrupt signal should be necessary
> to initiate communication and allow the operating system discover the UARTs
> ports behind the sc16is752. Please correct me if I am wrong.

Did you build your own kernel? Are you sure you're even using a device tree?
Does /proc/device-tree exist?

> I include the .dts file. I hope this time outlook does not scramble the text
> (set to text without format):
> // Definitions for SC16IS752 UART
> /dts-v1/;
> /plugin/;
> / {
> compatible = "brcm,bcm2708";
> fragment@0 {
>   target = <&i2c1>;
>   __overlay__ {
>     #address-cells = <1>;
>     #size-cells = <0>;
>     status = "okay";
>     sc16is752: sc16is752@4d {                                               
>          /*4d  is the address identified with i2cdetect command*/
>       compatible = "nxp,sc16is752";
>       reg = <0x4D>;
>       clocks = <&klok>;
>       interrupt-parent = <&gpio>;
>       interrupts = <23 0x2>; /* falling edge */
>       klok: klok {
>         compatible = "fixed-clock";
>         #clock-cells = <0>;
>         clock-frequency = <100000>;
>         };
>       };
>     };
>   };
>  };

Depending on the kernel version klok may have to moved to the <&clocks>
node in a separate fragment.

> Dealing with "/boot/config.txt” file, which of following options is the
> right one?:
> #Option 1
> dtparam=i2c_arm=on
> #Option 2
> dtparam=i2c0=on
> dtparam=i2c1=on

I'm pretty sure you need Option 1.

> 
> Thanks again for your support.
> 
> Regards,
> Juan.
> 
> -----Mensaje original-----
> De: Maarten Brock [mailto:m.brock@xxxxxxxxxxxxx] 
> Enviado el: viernes, 29 de abril de 2016 11:58
> Para: Juan García Pastor; linux-serial@xxxxxxxxxxxxxxx
> Asunto: Re: Raspberry compute module does not find ttySC0 and ttySC1 with
> SC16IS752 
> 
> Hello Juan,
> 
> Apart from the two I2C connections you will also need an interrupt signal.
> And this one also requires a pull up.
> 
> Maarten
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux