linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@bootlin.com>,
	Jason Cooper <jason@lakedaemon.net>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH] ARM: dts: mvebu: add support for SolidRun Clearfog GTR
Date: Sun, 01 Dec 2019 08:46:43 +0200	[thread overview]
Message-ID: <871rto7dbg.fsf@tarshish> (raw)
In-Reply-To: <20191129170717.GC28308@lunn.ch>

Hi Andrew,

Thanks for your review.

On Fri, Nov 29 2019, Andrew Lunn wrote:

> On Thu, Nov 28, 2019 at 07:00:06PM +0200, Baruch Siach wrote:
>> SolidRun Clearfog GTR L8 and S4 SBCs are based on Armada 385. They
>> features 8 (L8) or 4 (S4) switched Ethernet ports, 1 1Gb Ethernet port,
>> 1 directly connected SFP port, 1 SFP port behind the switch (not
>> currently described in DT),
>
> Hi Baruch
>
> Did you try to add the SFP on the switch? What problems did you have?
> The general support for it should be there.

I have not tested this SFP yet.

>> +			i2c@11100 { /* SFP */
>> +				pinctrl-0 = <&cf_gtr_i2c1_pins>;
>> +				pinctrl-names = "default";
>> +				status = "okay";
>> +			};
>
> Since there are two SFPs, it would be a good idea to indicate which
> one this is.

This port is marked CON5/CON6 on the PCB. I'll extend the comment in v2.

>> +	sfp: sfp {
>> +		compatible = "sff,sfp";
>> +		i2c-bus = <&i2c1>;
>> +		los-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
>> +		mod-def0-gpio = <&gpio0 25 GPIO_ACTIVE_LOW>;
>> +		tx-disable-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
>> +	};
>
> when you get the second sfp working you are going to have naming
> issue. So maybe call this sfp0?

Good idea.

>> +		led1 {
>> +			label = "led1";
>> +			gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
>> +		};
>> +
>> +		led2 {
>> +			label = "led2";
>> +			gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
>> +		};
>
> There is a naming convention of LEDS labels. This does not fit it.

Indeed. The 'label' property is deprecated since commit
c5d18dd6b64. These are general propose GPIOs. Not sure what 'function'
property fits here. Also, these GPIOs go out to an optional front-panel
connector. The 'color' property does not make much sense in that
case. I'll stick LED_COLOR_ID_GREEN for the no front-panel option.

>> +&gpio0 {
>> +	pinctrl-0 = <&cf_gtr_fan_pwm>;
>> +	pinctrl-names = "default";
>> +
>> +	wifi-disable {
>> +		gpio-hog;
>> +		gpios = <30 GPIO_ACTIVE_LOW>, <31 GPIO_ACTIVE_LOW>;
>> +		output-low;
>> +		line-name = "wifi-disable";
>> +	};
>> +};
>
> Isn't there a generic rfkill GPIO driver? Never looked, but it seems
> like it should exist.

Over the years there were attempts to add DT binding to rfkill-regulator
or rfkill-gpio:

  https://patchwork.kernel.org/patch/9407171/

  http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/247328.html

  https://www.spinics.net/lists/linux-wireless/msg84462.html

Not sure what is the right way to let userspace know about GPIO that
serves as rfkill.

>> +	sar-isolation {
>> +		gpio-hog;
>> +		gpios = <15 GPIO_ACTIVE_LOW>;
>> +		output-low;
>> +		line-name = "sar-isolation";
>> +	};
>
> What is SAR?

Sample at Reset. That's the Armada 38x datasheet term. This GPIO is
active at reset time to isolate SAR signals from interference of
external devices. We deassert isolation after reset to make these signal
usable.

baruch

--
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-12-01  6:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28 17:00 [PATCH] ARM: dts: mvebu: add support for SolidRun Clearfog GTR Baruch Siach
2019-11-29 17:07 ` Andrew Lunn
2019-12-01  6:46   ` Baruch Siach [this message]
2019-12-01 17:07     ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871rto7dbg.fsf@tarshish \
    --to=baruch@tkos.co.il \
    --cc=andrew@lunn.ch \
    --cc=gregory.clement@bootlin.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).