Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 4/6] ARM: dts: imx6qdl: Add Variscite DART-MX6 SoM support
From: Philippe Ombredanne @ 2017-12-01  9:40 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <118caa5c-6782-f4ca-443e-19d483171e01@baylibre.com>

Neil,

On Fri, Dec 1, 2017 at 10:19 AM, Neil Armstrong <narmstrong@baylibre.com> wrote:
> Hi Philippe,
>
> On 01/12/2017 10:02, Philippe Ombredanne wrote:
>> On Fri, Dec 1, 2017 at 9:54 AM, Neil Armstrong <narmstrong@baylibre.com> wrote:
>>> On 30/11/2017 01:39, Shawn Guo wrote:
>>>> On Wed, Nov 29, 2017 at 11:20:55AM +0100, Neil Armstrong wrote:
>>>>> This patch adds support for the Variscite DART-MX6 SoM with :
>>>>> - i.MX6 Quad or Dual Lite SoC
>>>>> - 1Gb/2Gb LPDDR2
>>>>> - 4-64 GB eMMC
>>>>> - Camera Interface
>>>>> - HDMI+CEC interface
>>>>> - LVDS / DSI / Parallel RGB interfaces
>>>>> - Ethernet RGMII interface
>>>>> - On-SoM Wi-Fi/Bluetooth with WiLink wl1835 SDIO Module
>>>>> - SD/MMC/SDIO interface
>>>>> - USB Host + USB OTG interface
>>>>> - I2C interfaces
>>>>> - SPI interfaces
>>>>> - PCI-Express 2.0 interface
>>>>> - on-SoM Audio Codec with HP/Line-In interfaces + DMIC interface
>>>>> - Digital Audio interface
>>>>> - S/PDIF interface
>>>>>
>>>>> Product website : http://www.variscite.com/products/system-on-module-som/cortex-a9/dart-mx6-cpu-freescale-imx6
>>>>>
>>>>> Support is handled with a SoM-centric dtsi exporting the default interfaces
>>>>> along the default pinmuxing to be enabled by the board dts file.
>>>>>
>>>>> Only board-independent devices like WiFi, eMMC or PMIC are enabled in the dtsi.
>>>>>
>>>>> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
>>>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>>>>
>>>> Looks pretty good.  Only a couple of minor comments.
>>>>
>>>>> ---
>>>>>  arch/arm/boot/dts/imx6qdl-var-dart.dtsi | 504 ++++++++++++++++++++++++++++++++
>>>>>  1 file changed, 504 insertions(+)
>>>>>  create mode 100644 arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/imx6qdl-var-dart.dtsi b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>>>> new file mode 100644
>>>>> index 0000000..fd2520b
>>>>> --- /dev/null
>>>>> +++ b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>>>> @@ -0,0 +1,504 @@
>>>>> +/*
>>>>> + * Support for Variscite DART-MX6 Module
>>>>> + *
>>>>> + * Copyright 2017 BayLibre, SAS
>>>>> + * Author: Neil Armstrong <narmstrong@baylibre.com>
>>>>> + *
>>>>> + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>>>> + */
>>
>> Should this be instead on the first line with a // comment style if
>> possible, right?
>
> I just saw this right now.
>
> Damn, I just sent a v5...
>
>>
>>>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>
>> Thomas has sent a first doc patch [1] set and is working on an updated
>> version.  Jonathan also wrote a nice background article on the topic
>> at LWN [2].
>>
>> Linus explained why he wants the // comment style and a first line
>> location on the list too.
>>
>> [1] https://marc.info/?l=linux-kernel&m=151051532322831&w=2
>> [2] https://lwn.net/SubscriberLink/739183/262749cbe307ddc7/
>>

Sorry for wrecking your workflow with a smallish comment related
comment and I am grateful that you consider this.

Thomas (tglx) is working on updated doc patches as soon as his real
time clock yields a few ticks for doc work...
The point is that Greg pushed already 10K+ file updates with proper
SPDX ids.... I chipped in a bit there and there are still eventually
60k+ files to go to have a uniform and simplified licensing
kernel-wide.

So, every little bit to help avoiding drift and regress is helpful.
Linus request for using // is to make this unambiguously greppable.

The selfish benefit to me is that  eventually I will be able to send
to the trash my license scanner in the future [1] (we use it to help
cleanup the kernel FWIW) and replace this with a good' ole grep once
everyone on earth use clean and greppable licensing... The kernel is
setting the pace there for the whole FLOSS world and I hope this will
snow ball, but hope is not a strategy! Once the kernel is done, I will
have only more or less 100 billion+ file left to clean after that ;)

[1] https://github.com/nexB/scancode-toolkit

-- 
Cordially
Philippe Ombredanne

^ permalink raw reply

* [PATCH 1/5] mtd: nand: use usual return values for the ->erase() hook
From: Boris Brezillon @ 2017-12-01  9:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171130230246.61a9ed19@xps13>

On Thu, 30 Nov 2017 23:02:46 +0100
Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:

> > > diff --git a/drivers/mtd/nand/nand_base.c
> > > b/drivers/mtd/nand/nand_base.c index 630048f5abdc..4d1f2bda6095
> > > 100644 --- a/drivers/mtd/nand/nand_base.c
> > > +++ b/drivers/mtd/nand/nand_base.c
> > > @@ -3077,7 +3077,7 @@ int nand_erase_nand(struct mtd_info *mtd,
> > > struct erase_info *instr, status = chip->erase(mtd, page &
> > > chip->pagemask); 
> > >  		/* See if block erase succeeded */
> > > -		if (status & NAND_STATUS_FAIL) {
> > > +		if (status) {
> > >  			pr_debug("%s: failed erase, page 0x%08x\n",
> > >  					__func__, page);
> > >  			instr->state = MTD_ERASE_FAILED;    
> > 
> > You forgot to patch single_erase() accordingly.  
> 
> Right, sorry about that, I will fix that.

If fixed it when applying, no need to resend.

Thanks,

Boris

> 
> Thanks,
> Miqu?l

^ permalink raw reply

* [RFC PATCH 1/3] dt-bindings: pinctrl: sunxi: document new generic binding
From: Linus Walleij @ 2017-12-01  9:38 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <0c8051e6-5d8c-32d6-97e4-11c2283da5b4@arm.com>

On Fri, Nov 24, 2017 at 6:19 PM, Andre Przywara <andre.przywara@arm.com> wrote:
> On 24/11/17 13:31, Thierry Reding wrote:

>> Register values don't belong in a device tree.
>
> I don't think that's true in a general way. This "pinmux" is already an
> accepted property and used for exactly that purpose in other pinctrl
> drivers:
> $ git grep -l '[^,]pinmux = ' arch/arm{,64}/boot/dts
> Plus the fsl,pinmux-ids property, which seems to serve the same purpose.

There are several examples of register values (and register
numbers even!) being encoded in the kernel.

What we need to ask is whether that is good in the general case
or bad. I don't even think that has a clear answer, it's a grey area.

So we need to avoid "arguments from consistency" which reads
something like "you allowed this thing A so now you must allow
this thing B which is similar". It is not a helpful approach to the
problem.

Some drivers encode a bunch of data into the device tree,
pinctrl-single is the most extreme. This conflict between in-DT
and in-driver data storage has been there since pinctrl was created
and was the result of a compromise between OMAPs needs
and everyone else, especially Tegra.

The opinions on this - and it is really opinions, not facts - differ
between people and over time.

Resolving the conflicts is more about classical diplomacy than
science unfortunately. I used to think the christian trinity was
amusing and inconsistent, but nowadays I understand exactly how
the people who came up with the Nicean creed were reasoning.

What is paramount for me as subsystem maintainer is the fact
that this driver has an active maintainer. And maintainers
is what makes things manageable for me. It would be much easier
for you to have your way if you were submitting an entirely
new driver. Like this pinmux property, it was submitted by the
mediatek people because it fits their usecase/hardware especially
well.

Yours,
Linus Walleij

^ permalink raw reply

* [PATCH 4/5] mtd: nand: use a static data_interface in the nand_chip structure
From: Boris Brezillon @ 2017-12-01  9:38 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171130170132.27522-5-miquel.raynal@free-electrons.com>

On Thu, 30 Nov 2017 18:01:31 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Change the nand_chip structure, to embed the nand_data_interface object.
> 
> Also remove the nand_get_default_data_interface() function that become
> useless but add the initialization of the data_interface at the very
> beginning of nand_scan_ident() to be sure core functions using timings
> may be used safely.
> 

It's not really clear why you do that, so I reworded this commit log
like that:

mtd: nand: provide valid ->data_interface during NAND detection

Right now, the chip->data_interface field is populated in
nand_scan_tail(), so after the whole NAND detection has taken place.
This is fine because these timings are not yet used by the core so
early in the probe process, but the situation is about to change with
the introduction of ->exec_op().

Also, by convention, nand_scan_ident() is not supposed to allocate
resources, only nand_scan_tail() can, so this prevent us from
allocating and initializing the data_interface object in
nand_scan_ident().

In order to solve this problem, directly embed a data_interface object
in nand_chip so that we don't have to allocate it, and initialize it to
ONFI SDR mode 0 at the very beginning of nand_scan_ident().

> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
> ---
>  drivers/mtd/nand/nand_base.c    | 44 ++++++++++++++++++-----------------------
>  drivers/mtd/nand/nand_timings.c | 21 +++++---------------
>  include/linux/mtd/rawnand.h     |  7 ++-----
>  3 files changed, 26 insertions(+), 46 deletions(-)
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index ee9825780a6c..52965a8aeb2c 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -816,8 +816,8 @@ static void nand_ccs_delay(struct nand_chip *chip)
>  	 * Wait tCCS_min if it is correctly defined, otherwise wait 500ns
>  	 * (which should be safe for all NANDs).
>  	 */
> -	if (chip->data_interface && chip->data_interface->timings.sdr.tCCS_min)
> -		ndelay(chip->data_interface->timings.sdr.tCCS_min / 1000);
> +	if (chip->setup_data_interface)
> +		ndelay(chip->data_interface.timings.sdr.tCCS_min / 1000);
>  	else
>  		ndelay(500);
>  }
> @@ -1112,7 +1112,6 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
>  static int nand_reset_data_interface(struct nand_chip *chip, int chipnr)
>  {
>  	struct mtd_info *mtd = nand_to_mtd(chip);
> -	const struct nand_data_interface *conf;
>  	int ret;
>  
>  	if (!chip->setup_data_interface)
> @@ -1132,8 +1131,8 @@ static int nand_reset_data_interface(struct nand_chip *chip, int chipnr)
>  	 * timings to timing mode 0.
>  	 */
>  
> -	conf = nand_get_default_data_interface();
> -	ret = chip->setup_data_interface(mtd, chipnr, conf);
> +	onfi_fill_data_interface(chip, NAND_SDR_IFACE, 0);
> +	ret = chip->setup_data_interface(mtd, chipnr, &chip->data_interface);
>  	if (ret)
>  		pr_err("Failed to configure data interface to SDR timing mode 0\n");
>  
> @@ -1158,7 +1157,7 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr)
>  	struct mtd_info *mtd = nand_to_mtd(chip);
>  	int ret;
>  
> -	if (!chip->setup_data_interface || !chip->data_interface)
> +	if (!chip->setup_data_interface)
>  		return 0;
>  
>  	/*
> @@ -1179,7 +1178,7 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr)
>  			goto err;
>  	}
>  
> -	ret = chip->setup_data_interface(mtd, chipnr, chip->data_interface);
> +	ret = chip->setup_data_interface(mtd, chipnr, &chip->data_interface);
>  err:
>  	return ret;
>  }
> @@ -1219,21 +1218,16 @@ static int nand_init_data_interface(struct nand_chip *chip)
>  		modes = GENMASK(chip->onfi_timing_mode_default, 0);
>  	}
>  
> -	chip->data_interface = kzalloc(sizeof(*chip->data_interface),
> -				       GFP_KERNEL);
> -	if (!chip->data_interface)
> -		return -ENOMEM;
>  
>  	for (mode = fls(modes) - 1; mode >= 0; mode--) {
> -		ret = onfi_init_data_interface(chip, chip->data_interface,
> -					       NAND_SDR_IFACE, mode);
> +		ret = onfi_fill_data_interface(chip, NAND_SDR_IFACE, mode);
>  		if (ret)
>  			continue;
>  
>  		/* Pass -1 to only */
>  		ret = chip->setup_data_interface(mtd,
>  						 NAND_DATA_IFACE_CHECK_ONLY,
> -						 chip->data_interface);
> +						 &chip->data_interface);
>  		if (!ret) {
>  			chip->onfi_timing_mode_default = mode;
>  			break;
> @@ -1243,11 +1237,6 @@ static int nand_init_data_interface(struct nand_chip *chip)
>  	return 0;
>  }
>  
> -static void nand_release_data_interface(struct nand_chip *chip)
> -{
> -	kfree(chip->data_interface);
> -}
> -
>  /**
>   * nand_read_page_op - Do a READ PAGE operation
>   * @chip: The NAND chip
> @@ -1763,11 +1752,16 @@ EXPORT_SYMBOL_GPL(nand_write_data_op);
>   * @chip: The NAND chip
>   * @chipnr: Internal die id
>   *
> + * Save the timings data structure, then apply SDR timings mode 0 (see
> + * nand_reset_data_interface for details), do the reset operation, and
> + * apply back the previous timings.
> + *
>   * Returns 0 for success or negative error code otherwise
>   */
>  int nand_reset(struct nand_chip *chip, int chipnr)
>  {
>  	struct mtd_info *mtd = nand_to_mtd(chip);
> +	struct nand_data_interface saved_data_intf = chip->data_interface;
>  	int ret;
>  
>  	ret = nand_reset_data_interface(chip, chipnr);
> @@ -1785,6 +1779,7 @@ int nand_reset(struct nand_chip *chip, int chipnr)
>  		return ret;
>  
>  	chip->select_chip(mtd, chipnr);
> +	chip->data_interface = saved_data_intf;
>  	ret = nand_setup_data_interface(chip, chipnr);
>  	chip->select_chip(mtd, -1);
>  	if (ret)
> @@ -4889,6 +4884,9 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
>  	struct nand_chip *chip = mtd_to_nand(mtd);
>  	int ret;
>  
> +	/* Enforce the right timings for reset/detection */
> +	onfi_fill_data_interface(chip, NAND_SDR_IFACE, 0);
> +
>  	ret = nand_dt_init(chip);
>  	if (ret)
>  		return ret;
> @@ -5629,7 +5627,7 @@ int nand_scan_tail(struct mtd_info *mtd)
>  		chip->select_chip(mtd, -1);
>  
>  		if (ret)
> -			goto err_nand_data_iface_cleanup;
> +			goto err_nand_manuf_cleanup;
>  	}
>  
>  	/* Check, if we should skip the bad block table scan */
> @@ -5639,12 +5637,10 @@ int nand_scan_tail(struct mtd_info *mtd)
>  	/* Build bad block table */
>  	ret = chip->scan_bbt(mtd);
>  	if (ret)
> -		goto err_nand_data_iface_cleanup;
> +		goto err_nand_manuf_cleanup;
>  
>  	return 0;
>  
> -err_nand_data_iface_cleanup:
> -	nand_release_data_interface(chip);
>  
>  err_nand_manuf_cleanup:
>  	nand_manufacturer_cleanup(chip);
> @@ -5703,8 +5699,6 @@ void nand_cleanup(struct nand_chip *chip)
>  	    chip->ecc.algo == NAND_ECC_BCH)
>  		nand_bch_free((struct nand_bch_control *)chip->ecc.priv);
>  
> -	nand_release_data_interface(chip);
> -
>  	/* Free bad block table memory */
>  	kfree(chip->bbt);
>  	if (!(chip->options & NAND_OWN_BUFFERS) && chip->buffers) {
> diff --git a/drivers/mtd/nand/nand_timings.c b/drivers/mtd/nand/nand_timings.c
> index 5d1533bcc5bd..9400d039ddbd 100644
> --- a/drivers/mtd/nand/nand_timings.c
> +++ b/drivers/mtd/nand/nand_timings.c
> @@ -283,16 +283,16 @@ const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode)
>  EXPORT_SYMBOL(onfi_async_timing_mode_to_sdr_timings);
>  
>  /**
> - * onfi_init_data_interface - [NAND Interface] Initialize a data interface from
> + * onfi_fill_data_interface - [NAND Interface] Initialize a data interface from
>   * given ONFI mode
> - * @iface: The data interface to be initialized
>   * @mode: The ONFI timing mode
>   */
> -int onfi_init_data_interface(struct nand_chip *chip,
> -			     struct nand_data_interface *iface,
> +int onfi_fill_data_interface(struct nand_chip *chip,
>  			     enum nand_data_interface_type type,
>  			     int timing_mode)
>  {
> +	struct nand_data_interface *iface = &chip->data_interface;
> +
>  	if (type != NAND_SDR_IFACE)
>  		return -EINVAL;
>  
> @@ -321,15 +321,4 @@ int onfi_init_data_interface(struct nand_chip *chip,
>  
>  	return 0;
>  }
> -EXPORT_SYMBOL(onfi_init_data_interface);
> -
> -/**
> - * nand_get_default_data_interface - [NAND Interface] Retrieve NAND
> - * data interface for mode 0. This is used as default timing after
> - * reset.
> - */
> -const struct nand_data_interface *nand_get_default_data_interface(void)
> -{
> -	return &onfi_sdr_timings[0];
> -}
> -EXPORT_SYMBOL(nand_get_default_data_interface);
> +EXPORT_SYMBOL(onfi_fill_data_interface);
> diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
> index 831bf91e0c34..0be959a478db 100644
> --- a/include/linux/mtd/rawnand.h
> +++ b/include/linux/mtd/rawnand.h
> @@ -917,7 +917,7 @@ struct nand_chip {
>  	u16 max_bb_per_die;
>  	u32 blocks_per_die;
>  
> -	struct nand_data_interface *data_interface;
> +	struct nand_data_interface data_interface;
>  
>  	int read_retries;
>  
> @@ -1214,8 +1214,7 @@ static inline int onfi_get_sync_timing_mode(struct nand_chip *chip)
>  	return le16_to_cpu(chip->onfi_params.src_sync_timing_mode);
>  }
>  
> -int onfi_init_data_interface(struct nand_chip *chip,
> -			     struct nand_data_interface *iface,
> +int onfi_fill_data_interface(struct nand_chip *chip,
>  			     enum nand_data_interface_type type,
>  			     int timing_mode);
>  
> @@ -1258,8 +1257,6 @@ static inline int jedec_feature(struct nand_chip *chip)
>  
>  /* get timing characteristics from ONFI timing mode. */
>  const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode);
> -/* get data interface from ONFI timing mode 0, used after reset. */
> -const struct nand_data_interface *nand_get_default_data_interface(void);
>  
>  int nand_check_erased_ecc_chunk(void *data, int datalen,
>  				void *ecc, int ecclen,

^ permalink raw reply

* [PATCH 0/5] Introduce the new NAND core interface: ->exec_op()
From: Boris Brezillon @ 2017-12-01  9:37 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171130170132.27522-1-miquel.raynal@free-electrons.com>

Hi all,

On Thu, 30 Nov 2017 18:01:27 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Hi,
> 
> This series adds the implementation of the NAND framework ->exec_op()
> interface with all the related hooks and helpers. The reasons for adding
> it are explained in details in the commit log:
> 
>         "mtd: nand: add ->exec_op() implementation"
> 
> Long story short: it will ease later expansion of the framework, as well
> as the implementation of new vendor specific commands, and should also
> ease driver development.
> 
> A lot of comments are written to explain how to use the new API. Several
> NAND controller drivers are already/almost converted to ->exec_op(), in
> particular a rework of the Marvell NAND controller driver, and will
> follow. One can have a look at them as examples to understand how to
> implement or rework NAND controller drivers. A proper external
> documentation is being written and will later be submitted.
> 
> Thank you,
> Miqu?l
> 
> 
> Boris Brezillon (2):
>   mtd: nand: provide several helpers to do common NAND operations
>   mtd: nand: force drivers to explicitly send READ/PROG commands
> 
> Miquel Raynal (3):
>   mtd: nand: use usual return values for the ->erase() hook
>   mtd: nand: use a static data_interface in the nand_chip structure
>   mtd: nand: add ->exec_op() implementation

Applied patches 1 to 4 (with a rewording of patch 4 commit message and
a fix in patch 1 to make single_erase() compliant with the new
->erase() semantic).

Note that I was prompt to apply those patches because I want them to
spend as much time as possible in linux-next so that we can detect and
fix regressions before the merge window. So please test linux-next on
your hardware.

This being said, nothing is set in stone, and if the series appears to
break existing setups and we can't fix the problems before -rc6, I'll
drop it.

Thanks,

Boris

> 
>  drivers/mtd/nand/atmel/nand-controller.c      |    9 +-
>  drivers/mtd/nand/bf5xx_nand.c                 |    6 +-
>  drivers/mtd/nand/brcmnand/brcmnand.c          |   20 +-
>  drivers/mtd/nand/cafe_nand.c                  |   20 +-
>  drivers/mtd/nand/denali.c                     |   40 +-
>  drivers/mtd/nand/diskonchip.c                 |    4 +-
>  drivers/mtd/nand/docg4.c                      |   21 +-
>  drivers/mtd/nand/fsl_elbc_nand.c              |   10 +-
>  drivers/mtd/nand/fsl_ifc_nand.c               |    6 +-
>  drivers/mtd/nand/fsmc_nand.c                  |    5 +-
>  drivers/mtd/nand/gpmi-nand/gpmi-nand.c        |   77 +-
>  drivers/mtd/nand/hisi504_nand.c               |    9 +-
>  drivers/mtd/nand/jz4740_nand.c                |   16 +-
>  drivers/mtd/nand/lpc32xx_mlc.c                |    7 +-
>  drivers/mtd/nand/lpc32xx_slc.c                |   33 +-
>  drivers/mtd/nand/mtk_nand.c                   |   25 +-
>  drivers/mtd/nand/nand_base.c                  | 2161 ++++++++++++++++++++++---
>  drivers/mtd/nand/nand_hynix.c                 |  124 +-
>  drivers/mtd/nand/nand_micron.c                |   83 +-
>  drivers/mtd/nand/nand_timings.c               |   21 +-
>  drivers/mtd/nand/omap2.c                      |   18 +-
>  drivers/mtd/nand/pxa3xx_nand.c                |   14 +-
>  drivers/mtd/nand/qcom_nandc.c                 |   27 +-
>  drivers/mtd/nand/r852.c                       |   11 +-
>  drivers/mtd/nand/sh_flctl.c                   |    6 +-
>  drivers/mtd/nand/sunxi_nand.c                 |   97 +-
>  drivers/mtd/nand/tango_nand.c                 |   27 +-
>  drivers/mtd/nand/tmio_nand.c                  |    5 +-
>  drivers/mtd/nand/vf610_nfc.c                  |    6 +-
>  drivers/staging/mt29f_spinand/mt29f_spinand.c |    5 +-
>  include/linux/mtd/rawnand.h                   |  414 ++++-
>  31 files changed, 2673 insertions(+), 654 deletions(-)
> 

^ permalink raw reply

* [PATCH] ARM64: dts: meson-axg: enable IR controller
From: Jerome Brunet @ 2017-12-01  9:25 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171201013612.13927-1-yixun.lan@amlogic.com>

On Fri, 2017-12-01 at 09:36 +0800, Yixun Lan wrote:
> Enable IR remote controller which find in Amlogic's Meson-AXG SoC.
> 
> Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-axg-s400.dts |  6 ++++++
>  arch/arm64/boot/dts/amlogic/meson-axg.dtsi     | 14 ++++++++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> index 0864d1ff2d9b..ca676cafdbb3 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> @@ -34,3 +34,9 @@
>  	pinctrl-0 = <&i2c1_z_pins>;
>  	pinctrl-names = "default";
>  };
> +
> +&ir {
> +	status = "okay";
> +	pinctrl-0 = <&remote_input_ao_pins>;
> +	pinctrl-names = "default";
> +};
> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> index 9bb85893c1b7..80d5b8c13fac 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> @@ -616,6 +616,13 @@
>  					#gpio-cells = <2>;
>  					gpio-ranges = <&pinctrl_aobus 0 0
> 15>;
>  				};
> +
> +				remote_input_ao_pins: remote_input_ao {
> +					mux {
> +						groups = "remote_input_ao";
> +						function = "remote_input_ao";
> +					};
> +				};
>  			};
>  
>  			i2c_AO: i2c at 5000 {
> @@ -664,6 +671,13 @@
>  				clock-names = "xtal", "pclk", "baud";
>  				status = "disabled";
>  			};
> +
> +			ir: ir at 8000 {
> +				compatible = "amlogic,meson-gx-
> ir","amlogic,meson-gxbb-ir";

The order is bad here (Yes the same mistake is present a *LOT* in the gx family
- I'm preparing a patch for that). In addition, "amlogic,meson-gx-ir" is
unmatched, undocumented and unlikely to be ever used since every compatible SoC
will use the gxbb compatible string. You may as well drop it and just keep the
gxbb one

> +				reg = <0x0 0x8000 0x0 0x20>;
> +				interrupts = <GIC_SPI 196
> IRQ_TYPE_EDGE_RISING>;
> +				status = "disabled";
> +			};
>  		};
>  	};
>  };

^ permalink raw reply

* [PATCH v4 4/6] ARM: dts: imx6qdl: Add Variscite DART-MX6 SoM support
From: Neil Armstrong @ 2017-12-01  9:19 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAOFm3uEY8+B8mhdcSLexdF8U8rq9kU2dM+ix=A_f+5kU_iR=nQ@mail.gmail.com>

Hi Philippe,

On 01/12/2017 10:02, Philippe Ombredanne wrote:
> On Fri, Dec 1, 2017 at 9:54 AM, Neil Armstrong <narmstrong@baylibre.com> wrote:
>> On 30/11/2017 01:39, Shawn Guo wrote:
>>> On Wed, Nov 29, 2017 at 11:20:55AM +0100, Neil Armstrong wrote:
>>>> This patch adds support for the Variscite DART-MX6 SoM with :
>>>> - i.MX6 Quad or Dual Lite SoC
>>>> - 1Gb/2Gb LPDDR2
>>>> - 4-64 GB eMMC
>>>> - Camera Interface
>>>> - HDMI+CEC interface
>>>> - LVDS / DSI / Parallel RGB interfaces
>>>> - Ethernet RGMII interface
>>>> - On-SoM Wi-Fi/Bluetooth with WiLink wl1835 SDIO Module
>>>> - SD/MMC/SDIO interface
>>>> - USB Host + USB OTG interface
>>>> - I2C interfaces
>>>> - SPI interfaces
>>>> - PCI-Express 2.0 interface
>>>> - on-SoM Audio Codec with HP/Line-In interfaces + DMIC interface
>>>> - Digital Audio interface
>>>> - S/PDIF interface
>>>>
>>>> Product website : http://www.variscite.com/products/system-on-module-som/cortex-a9/dart-mx6-cpu-freescale-imx6
>>>>
>>>> Support is handled with a SoM-centric dtsi exporting the default interfaces
>>>> along the default pinmuxing to be enabled by the board dts file.
>>>>
>>>> Only board-independent devices like WiFi, eMMC or PMIC are enabled in the dtsi.
>>>>
>>>> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
>>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>>>
>>> Looks pretty good.  Only a couple of minor comments.
>>>
>>>> ---
>>>>  arch/arm/boot/dts/imx6qdl-var-dart.dtsi | 504 ++++++++++++++++++++++++++++++++
>>>>  1 file changed, 504 insertions(+)
>>>>  create mode 100644 arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>>>
>>>> diff --git a/arch/arm/boot/dts/imx6qdl-var-dart.dtsi b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>>> new file mode 100644
>>>> index 0000000..fd2520b
>>>> --- /dev/null
>>>> +++ b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>>> @@ -0,0 +1,504 @@
>>>> +/*
>>>> + * Support for Variscite DART-MX6 Module
>>>> + *
>>>> + * Copyright 2017 BayLibre, SAS
>>>> + * Author: Neil Armstrong <narmstrong@baylibre.com>
>>>> + *
>>>> + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>>> + */
> 
> Should this be instead on the first line with a // comment style if
> possible, right?

I just saw this right now.

Damn, I just sent a v5...

> 
>>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> 
> Thomas has sent a first doc patch [1] set and is working on an updated
> version.  Jonathan also wrote a nice background article on the topic
> at LWN [2].
> 
> Linus explained why he wants the // comment style and a first line
> location on the list too.
> 
> [1] https://marc.info/?l=linux-kernel&m=151051532322831&w=2
> [2] https://lwn.net/SubscriberLink/739183/262749cbe307ddc7/
> 

Neil

^ permalink raw reply

* [PATCH V4 3/5] device property: Introduce a common API to fetch device match data
From: Sakari Ailus @ 2017-12-01  9:13 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1512096776-22883-4-git-send-email-okaya@codeaurora.org>

Hi Sinan,

Thanks for the patch.

On Thu, Nov 30, 2017 at 09:52:54PM -0500, Sinan Kaya wrote:
> There is an OF/ACPI function to obtain the driver data. We want to hide
> OF/ACPI details from the device drivers and abstract following the device
> family of functions.
> 
> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
> ---
>  drivers/base/property.c  | 14 ++++++++++++++
>  include/linux/property.h |  2 ++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 7ed99c1..6adec89 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -15,6 +15,7 @@
>  #include <linux/kernel.h>
>  #include <linux/of.h>
>  #include <linux/of_address.h>
> +#include <linux/of_device.h>
>  #include <linux/of_graph.h>
>  #include <linux/property.h>
>  #include <linux/etherdevice.h>
> @@ -1335,3 +1336,16 @@ int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
>  	return fwnode_call_int_op(fwnode, graph_parse_endpoint, endpoint);
>  }
>  EXPORT_SYMBOL(fwnode_graph_parse_endpoint);
> +
> +void *device_get_match_data(struct device *dev)
> +{
> +	void *ret;
> +
> +	if (IS_ENABLED(CONFIG_OF) && dev->of_node)

Most of the dev->of_node checks have been removed from property.c and
replaced by calls to the firmware specific fwnode operations. What remains
should probably be moved there, too (apart from dev_fwnode).

How about adding a new op for this one to struct fwnode_operations in
include/linux/fwnode.h?

> +		ret = (void *)of_device_get_match_data(dev);
> +	else
> +		ret = acpi_get_match_data(dev);
> +
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(device_get_match_data);
> diff --git a/include/linux/property.h b/include/linux/property.h
> index 6bebee1..01fa55b 100644
> --- a/include/linux/property.h
> +++ b/include/linux/property.h
> @@ -275,6 +275,8 @@ int device_add_properties(struct device *dev,
>  
>  enum dev_dma_attr device_get_dma_attr(struct device *dev);
>  
> +void *device_get_match_data(struct device *dev);
> +
>  int device_get_phy_mode(struct device *dev);
>  
>  void *device_get_mac_address(struct device *dev, char *addr, int alen);

-- 
Kind regards,

Sakari Ailus
sakari.ailus at linux.intel.com

^ permalink raw reply

* [PATCH 2/2] arm64: allwinner: a64-sopine: Use dcdc1 regulator instead of vcc3v3
From: Jagan Teki @ 2017-12-01  9:06 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1512119165-15290-1-git-send-email-jagan@amarulasolutions.com>

Since current tree support AXP803 regulators,
replace fixed regulator vcc3v3 with AXP803 dcdc1 regulator.

Tested mmc0 on sopine baseboard.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts |  2 +-
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi          | 11 +----------
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index a053a6a..abe179d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -96,7 +96,7 @@
 &mmc2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc2_pins>;
-	vmmc-supply = <&reg_vcc3v3>;
+	vmmc-supply = <&reg_dcdc1>;
 	vqmmc-supply = <&reg_vcc1v8>;
 	bus-width = <8>;
 	non-removable;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
index a5da18a..43418bd 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
@@ -45,19 +45,10 @@
 
 #include "sun50i-a64.dtsi"
 
-/ {
-	reg_vcc3v3: vcc3v3 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc3v3";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-	};
-};
-
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins>;
-	vmmc-supply = <&reg_vcc3v3>;
+	vmmc-supply = <&reg_dcdc1>;
 	non-removable;
 	disable-wp;
 	bus-width = <4>;
-- 
2.7.4

^ permalink raw reply related

* [PATCH 1/2] arm64: dts: a64-olinuxino: Enable RTL8723BS WiFi
From: Jagan Teki @ 2017-12-01  9:06 UTC (permalink / raw)
  To: linux-arm-kernel

Enable RTL8723BS WiFi chip on a64-olinuxino board:
- WiFi SDIO interface is connected to MMC1
- WiFi REG_ON pin connected to gpio PL2: attach to mmc-pwrseq
- WiFi HOST_WAKE pin connected to gpio PL3

To make rtl8723bs chip to work build it as module to and run
CONFIG_RTL8723BS=m

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 .../boot/dts/allwinner/sun50i-a64-olinuxino.dts    | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 338e7861..8807664 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -57,6 +57,11 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	wifi_pwrseq: wifi_pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
+	};
 };
 
 &mmc0 {
@@ -70,6 +75,24 @@
 	status = "okay";
 };
 
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins>;
+	vmmc-supply = <&reg_aldo2>;
+	vqmmc-supply = <&reg_dldo4>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+
+	rtl8723bs: wifi at 1 {
+		reg = <1>;
+		interrupt-parent = <&r_pio>;
+		interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
+		interrupt-names = "host-wake";
+	};
+};
+
 &r_rsb {
 	status = "okay";
 
-- 
2.7.4

^ permalink raw reply related

* [PATCH v5 6/6] ARM: imx_v6_v7_defconfig: Add missing config for DART-MX6 SoM
From: Neil Armstrong @ 2017-12-01  9:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1512119024-521-1-git-send-email-narmstrong@baylibre.com>

This patch adds the missing configs for the DART-MX6 SoM support :
- SERDEV bluetooth driver + SERIAL_DEV_BUS configs
- WL18XX driver
- DEFAULT_ON Led Trigger

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm/configs/imx_v6_v7_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 0d44949..abd06c3 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -80,6 +80,7 @@ CONFIG_CAN=y
 CONFIG_CAN_FLEXCAN=y
 CONFIG_BT=y
 CONFIG_BT_HCIUART=y
+CONFIG_BT_HCIUART_SERDEV=y
 CONFIG_BT_HCIUART_H4=y
 CONFIG_BT_HCIUART_LL=y
 CONFIG_CFG80211=y
@@ -155,6 +156,7 @@ CONFIG_USB_USBNET=y
 CONFIG_USB_NET_CDC_EEM=m
 CONFIG_BRCMFMAC=m
 CONFIG_WL12XX=m
+CONFIG_WL18XX=m
 CONFIG_WLCORE_SDIO=m
 # CONFIG_WILINK_PLATFORM_DATA is not set
 CONFIG_INPUT_EVDEV=y
@@ -185,6 +187,8 @@ CONFIG_SERIAL_IMX=y
 CONFIG_SERIAL_IMX_CONSOLE=y
 CONFIG_SERIAL_FSL_LPUART=y
 CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
+CONFIG_SERIAL_DEV_BUS=y
+CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
 # CONFIG_I2C_COMPAT is not set
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_MUX=y
@@ -248,6 +252,7 @@ CONFIG_VIDEO_OV5640=m
 CONFIG_SOC_CAMERA_OV2640=y
 CONFIG_IMX_IPUV3_CORE=y
 CONFIG_DRM=y
+CONFIG_DRM_PANEL_LVDS=y
 CONFIG_DRM_PANEL_SIMPLE=y
 CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
 CONFIG_DRM_DW_HDMI_CEC=y
@@ -340,6 +345,7 @@ CONFIG_LEDS_TRIGGER_ONESHOT=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 CONFIG_LEDS_TRIGGER_BACKLIGHT=y
 CONFIG_LEDS_TRIGGER_GPIO=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_INTF_DEV_UIE_EMUL=y
 CONFIG_RTC_DRV_DS1307=y
-- 
2.7.4

^ permalink raw reply related

* [PATCH v5 5/6] ARM: dts: imx6q: Add Variscite DART-MX6 Carrier-board support
From: Neil Armstrong @ 2017-12-01  9:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1512119024-521-1-git-send-email-narmstrong@baylibre.com>

This patch adds support for the i.MX6 Quad variant of the Variscite DART-MX6
SoM Carrier-Board.

This Carrier-Board has the following :
- LVDS interface for the VLCD-CAP-GLD-LVDS 7" LCD 800 x 480 touch display
- HDMI Connector
- USB Host + USB OTG Connector
- 10/100/1000 Mbps Ethernet
- miniPCI-Express slot
- SD Card connector
- Audio Headphone/Line In jack connectors
- On-board DMIC
- CAN bus header
- SPI header
- Camera Interfaces header
- 4xButtons, 2xLeds
- OnBoard RTC with Coin Backup battery socket
- RS232 Header + USB-Serial debug port

Product Page : http://www.variscite.com/products/evaluation-kits/dart-mx6-kits

The board support is done with all on-board and header interfaces enabled.
7" LVDS Touchscreen is enabled by default along HDMI output.
Audio interface is supported with the "simple-card" bindings.

PCIe slot, On-Board DMIC and Camera Interfaces are not handled yet.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm/boot/dts/Makefile                     |   1 +
 arch/arm/boot/dts/imx6q-var-dt6customboard.dts | 236 +++++++++++++++++++++++++
 2 files changed, 237 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx6q-var-dt6customboard.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d0381e9..148ff15 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -470,6 +470,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
 	imx6q-tx6q-11x0-mb7.dtb \
 	imx6q-udoo.dtb \
 	imx6q-utilite-pro.dtb \
+	imx6q-var-dt6customboard.dtb \
 	imx6q-wandboard.dtb \
 	imx6q-wandboard-revb1.dtb \
 	imx6q-wandboard-revd1.dtb \
diff --git a/arch/arm/boot/dts/imx6q-var-dt6customboard.dts b/arch/arm/boot/dts/imx6q-var-dt6customboard.dts
new file mode 100644
index 0000000..48f1ee5
--- /dev/null
+++ b/arch/arm/boot/dts/imx6q-var-dt6customboard.dts
@@ -0,0 +1,236 @@
+/*
+ * Support for Variscite DART-MX6 Carrier-board
+ *
+ * Copyright 2017 BayLibre, SAS
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+ */
+
+/dts-v1/;
+
+#include "imx6q.dtsi"
+#include "imx6qdl-var-dart.dtsi"
+#include <dt-bindings/input/linux-event-codes.h>
+
+/ {
+	model = "Variscite DART-MX6 Carrier-board";
+	compatible = "variscite,dt6customboard", "fsl,imx6q";
+
+	backlight_lvds: backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm2 0 50000>;
+		brightness-levels = <0 4 8 16 32 64 128 248>;
+		default-brightness-level = <7>;
+		status = "okay";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		autorepeat;
+
+		back {
+			gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_BACK>;
+			label = "Key Back";
+			linux,input-type = <1>;
+			debounce-interval = <100>;
+			wakeup-source;
+		};
+
+		home {
+			gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_HOME>;
+			label = "Key Home";
+			linux,input-type = <1>;
+			debounce-interval = <100>;
+			wakeup-source;
+		};
+
+		menu {
+			gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_MENU>;
+			label = "Key Menu";
+			linux,input-type = <1>;
+			debounce-interval = <100>;
+			wakeup-source;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		led1 {
+			gpios = <&gpio4 27 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+
+		led2 {
+			gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "default-on";
+		};
+	};
+
+	panel1: lvds-panel {
+		compatible = "sgd,gktw70sdae4se", "panel-lvds";
+		backlight = <&backlight_lvds>;
+		width-mm = <153>;
+		height-mm = <86>;
+		label = "gktw70sdae4se";
+		data-mapping = "jeida-18";
+
+		panel-timing {
+			clock-frequency = <32000000>;
+			hactive = <800>;
+			vactive = <480>;
+			hback-porch = <39>;
+			hfront-porch = <39>;
+			vback-porch = <29>;
+			vfront-porch = <13>;
+			hsync-len = <47>;
+			vsync-len = <2>;
+		};
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&lvds1_out>;
+			};
+		};
+	};
+
+	reg_usb_h1_vbus: regulator-usbh1vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_h1_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	reg_usb_otg_vbus: regulator-usbotgvbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_otg_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "dt6-customboard-audio";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,bitclock-master = <&sound_codec>;
+		simple-audio-card,frame-master = <&sound_codec>;
+		simple-audio-card,widgets = "Headphone", "Headphone Jack",
+					    "Line", "Line In";
+		simple-audio-card,routing = "Headphone Jack", "HPLOUT",
+					    "Headphone Jack", "HPROUT",
+					    "LINE1L", "Line In",
+					    "LINE1R", "Line In";
+
+		sound_cpu: simple-audio-card,cpu {
+			sound-dai = <&ssi2>;
+		};
+
+		sound_codec: simple-audio-card,codec {
+			sound-dai = <&tlv320aic3106>;
+			clocks = <&clks IMX6QDL_CLK_CKO>;
+		};
+	};
+};
+
+&can1 {
+	status = "okay";
+};
+
+&ecspi1 {
+	cs-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>,
+		   <&gpio4 10 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
+&fec {
+	status = "okay";
+	phy-mode = "rgmii";
+	phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
+};
+
+&hdmi {
+	status = "okay";
+};
+
+&i2c1 {
+	clock-frequency = <100000>;
+	status = "okay";
+};
+
+&i2c3 {
+	clock-frequency = <100000>;
+	status = "okay";
+
+	touchscreen at 38 {
+		compatible = "edt,edt-ft5x06";
+		reg = <0x38>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
+		touchscreen-size-x = <800>;
+		touchscreen-size-y = <480>;
+		touchscreen-inverted-x;
+		touchscreen-inverted-y;
+	};
+
+	rtc at 68 {
+		compatible = "isil,isl12057";
+		reg = <0x68>;
+	};
+};
+
+&ldb {
+	status = "okay";
+
+	lvds-channel at 1 {
+		status = "okay";
+
+		port at 4 {
+			reg = <4>;
+
+			lvds1_out: endpoint {
+				remote-endpoint = <&panel_in>;
+			};
+		};
+	};
+};
+
+&pwm2 {
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&uart3 {
+	status = "okay";
+};
+
+&usbh1 {
+	vbus-supply = <&reg_usb_h1_vbus>;
+	status = "okay";
+};
+
+&usbotg {
+	vbus-supply = <&reg_usb_otg_vbus>;
+	dr_mode = "otg";
+	srp-disable;
+	hnp-disable;
+	adp-disable;
+	status = "okay";
+};
+
+&usdhc2 {
+	cd-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+	status = "okay";
+};
-- 
2.7.4

^ permalink raw reply related

* [PATCH v5 4/6] ARM: dts: imx6qdl: Add Variscite DART-MX6 SoM support
From: Neil Armstrong @ 2017-12-01  9:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1512119024-521-1-git-send-email-narmstrong@baylibre.com>

This patch adds support for the Variscite DART-MX6 SoM with :
- i.MX6 Quad or Dual Lite SoC
- 1Gb/2Gb LPDDR2
- 4-64 GB eMMC
- Camera Interface
- HDMI+CEC interface
- LVDS / DSI / Parallel RGB interfaces
- Ethernet RGMII interface
- On-SoM Wi-Fi/Bluetooth with WiLink wl1835 SDIO Module
- SD/MMC/SDIO interface
- USB Host + USB OTG interface
- I2C interfaces
- SPI interfaces
- PCI-Express 2.0 interface
- on-SoM Audio Codec with HP/Line-In interfaces + DMIC interface
- Digital Audio interface
- S/PDIF interface

Product website : http://www.variscite.com/products/system-on-module-som/cortex-a9/dart-mx6-cpu-freescale-imx6

Support is handled with a SoM-centric dtsi exporting the default interfaces
along the default pinmuxing to be enabled by the board dts file.

Only board-independent devices like WiFi, eMMC or PMIC are enabled in the dtsi.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm/boot/dts/imx6qdl-var-dart.dtsi | 504 ++++++++++++++++++++++++++++++++
 1 file changed, 504 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx6qdl-var-dart.dtsi

diff --git a/arch/arm/boot/dts/imx6qdl-var-dart.dtsi b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
new file mode 100644
index 0000000..75bdbad
--- /dev/null
+++ b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
@@ -0,0 +1,504 @@
+/*
+ * Support for Variscite DART-MX6 Module
+ *
+ * Copyright 2017 BayLibre, SAS
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/sound/fsl-imx-audmux.h>
+
+/ {
+	memory {
+		reg = <0x10000000 0x40000000>;
+	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "3P3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
+	reg_wl18xx_vmmc: regulator-wl18xx {
+		compatible = "regulator-fixed";
+		regulator-name = "vwl1807";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		startup-delay-us = <70000>;
+	};
+};
+
+&audmux {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_audmux>;
+	status = "okay";
+
+	ssi2 {
+		fsl,audmux-port = <1>;
+		fsl,port-config = <
+			(IMX_AUDMUX_V2_PTCR_SYN |
+			IMX_AUDMUX_V2_PTCR_TFSDIR |
+			IMX_AUDMUX_V2_PTCR_TFSEL(2) |
+			IMX_AUDMUX_V2_PTCR_TCLKDIR |
+			IMX_AUDMUX_V2_PTCR_TCSEL(2))
+			IMX_AUDMUX_V2_PDCR_RXDSEL(2)
+		>;
+	};
+
+	aud3 {
+		fsl,audmux-port = <2>;
+		fsl,port-config = <
+			IMX_AUDMUX_V2_PTCR_SYN
+			IMX_AUDMUX_V2_PDCR_RXDSEL(1)
+		>;
+	};
+};
+
+&can1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_flexcan1>;
+	status = "disabled";
+};
+
+&can2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_flexcan2>;
+	status = "disabled";
+};
+
+&ecspi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ecspi1>;
+	status = "disabled";
+};
+
+&fec {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_enet>;
+	phy-mode = "rgmii";
+	status = "disabled";
+};
+
+&hdmi {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hdmicec>;
+	ddc-i2c-bus = <&i2c1>;
+	status = "disabled";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1>;
+	status = "disabled";
+};
+
+&i2c2 {
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+
+	pmic at 8 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_pmic>;
+		compatible = "fsl,pfuze100";
+		reg = <0x08>;
+
+		regulators {
+			sw1a_reg: sw1ab {
+				regulator-min-microvolt = <300000>;
+				regulator-max-microvolt = <1875000>;
+				regulator-boot-on;
+				regulator-always-on;
+				regulator-ramp-delay = <6250>;
+			};
+
+			sw1c_reg: sw1c {
+				regulator-min-microvolt = <300000>;
+				regulator-max-microvolt = <1875000>;
+				regulator-boot-on;
+				regulator-always-on;
+				regulator-ramp-delay = <6250>;
+			};
+
+			sw2_reg: sw2 {
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			sw3a_reg: sw3a {
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			sw3b_reg: sw3b {
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			sw4_reg: sw4 {
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			snvs_reg: vsnvs {
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3000000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			vref_reg: vrefddr {
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			vgen6_reg: vgen6 {
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+		};
+	};
+
+	tlv320aic3106: codec at 1b {
+		compatible = "ti,tlv320aic3106";
+		reg = <0x1b>;
+		#sound-dai-cells = <0>;
+		DRVDD-supply = <&reg_3p3v>;
+		AVDD-supply = <&reg_3p3v>;
+		IOVDD-supply = <&reg_3p3v>;
+		DVDD-supply = <&reg_3p3v>;
+		ai3x-ocmv = <0>;
+		gpio-reset = <&gpio5 5 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c3>;
+	status = "disabled";
+};
+
+&iomuxc {
+	pinctrl_audmux: audmux {
+		fsl,pins = <
+			MX6QDL_PAD_CSI0_DAT7__AUD3_RXD		0x130b0
+			MX6QDL_PAD_CSI0_DAT4__AUD3_TXC		0x130b0
+			MX6QDL_PAD_CSI0_DAT5__AUD3_TXD		0x110b0
+			MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS		0x130b0
+			/* Audio Clock */
+			MX6QDL_PAD_GPIO_0__CCM_CLKO1		0x130b0
+		>;
+	};
+
+	pinctrl_bt: bt {
+		fsl,pins = <
+			/* Bluetooth enable */
+			MX6QDL_PAD_SD3_DAT6__GPIO6_IO18		0x1b0b1
+			/* Bluetooth Slow Clock */
+			MX6QDL_PAD_ENET_RXD0__OSC32K_32K_OUT	0x000b0
+		>;
+	};
+
+	pinctrl_ecspi1: ecspi1grp {
+		fsl,pins = <
+			MX6QDL_PAD_KEY_COL1__ECSPI1_MISO	0x100b1
+			MX6QDL_PAD_KEY_ROW0__ECSPI1_MOSI	0x100b1
+			MX6QDL_PAD_KEY_COL0__ECSPI1_SCLK	0x100b1
+			/* SPI1 CS0 */
+			MX6QDL_PAD_KEY_ROW1__GPIO4_IO09		0x1b0b0
+			/* SPI1 CS1 */
+			MX6QDL_PAD_KEY_COL2__GPIO4_IO10		0x1b0b0
+		>;
+	};
+
+	pinctrl_enet: enetgrp {
+		fsl,pins = <
+			MX6QDL_PAD_ENET_MDIO__ENET_MDIO		0x100b0
+			MX6QDL_PAD_ENET_MDC__ENET_MDC		0x100b0
+			MX6QDL_PAD_RGMII_TXC__RGMII_TXC		0x10030
+			MX6QDL_PAD_RGMII_TD0__RGMII_TD0		0x10030
+			MX6QDL_PAD_RGMII_TD1__RGMII_TD1		0x10030
+			MX6QDL_PAD_RGMII_TD2__RGMII_TD2		0x10030
+			MX6QDL_PAD_RGMII_TD3__RGMII_TD3		0x10030
+			MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL	0x10030
+			MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK	0x100b0
+			MX6QDL_PAD_RGMII_RXC__RGMII_RXC		0x1b030
+			MX6QDL_PAD_RGMII_RD0__RGMII_RD0		0x1b030
+			MX6QDL_PAD_RGMII_RD1__RGMII_RD1		0x1b030
+			MX6QDL_PAD_RGMII_RD2__RGMII_RD2		0x1b030
+			MX6QDL_PAD_RGMII_RD3__RGMII_RD3		0x1b030
+			MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL	0x1b030
+		>;
+	};
+
+	pinctrl_flexcan1: flexcan1grp {
+		fsl,pins = <
+			MX6QDL_PAD_GPIO_7__FLEXCAN1_TX	0x1b0b0
+			MX6QDL_PAD_GPIO_8__FLEXCAN1_RX	0x1b0b0
+		>;
+	};
+
+	pinctrl_flexcan2: flexcan2grp {
+		fsl,pins = <
+			MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX	0x1b0b0
+			MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX	0x1b0b0
+		>;
+	};
+
+	pinctrl_hdmicec: hdmicecgrp {
+		fsl,pins = <
+			MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE	0x1f8b0
+		>;
+	};
+
+	pinctrl_i2c1: i2c1grp {
+		fsl,pins = <
+			MX6QDL_PAD_CSI0_DAT8__I2C1_SDA	0x4001b8b1
+			MX6QDL_PAD_CSI0_DAT9__I2C1_SCL	0x4001b8b1
+		>;
+	};
+
+	pinctrl_i2c2: i2c2grp {
+		fsl,pins = <
+			MX6QDL_PAD_KEY_COL3__I2C2_SCL	0x4001b8b1
+			MX6QDL_PAD_KEY_ROW3__I2C2_SDA	0x4001b8b1
+		>;
+	};
+
+	pinctrl_i2c3: i2c3grp {
+		fsl,pins = <
+			MX6QDL_PAD_GPIO_5__I2C3_SCL	0x4001b8b1
+			MX6QDL_PAD_GPIO_16__I2C3_SDA	0x4001b8b1
+		>;
+	};
+
+	pinctrl_pmic: pmicgrp {
+		fsl,pins = <
+			/* PMIC INT */
+			MX6QDL_PAD_GPIO_17__GPIO7_IO12	0x1b0b1
+		>;
+	};
+
+	pinctrl_pwm2: pwm2grp {
+		fsl,pins = <
+			MX6QDL_PAD_DISP0_DAT9__PWM2_OUT	0x1b0b1
+		>;
+	};
+
+	pinctrl_uart1: uart1grp {
+		fsl,pins = <
+			MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
+			MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
+		>;
+	};
+
+	pinctrl_uart2: uart2grp {
+		fsl,pins = <
+			MX6QDL_PAD_SD3_DAT4__UART2_RX_DATA	0x1b0b1
+			MX6QDL_PAD_SD3_DAT5__UART2_TX_DATA	0x1b0b1
+			MX6QDL_PAD_SD4_DAT6__UART2_CTS_B	0x1b0b1
+			MX6QDL_PAD_SD4_DAT5__UART2_RTS_B	0x1b0b1
+		>;
+	};
+
+	pinctrl_uart3: uart3grp {
+		fsl,pins = <
+			MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
+			MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
+			MX6QDL_PAD_EIM_D23__UART3_CTS_B   0x1b0b1
+			MX6QDL_PAD_EIM_EB3__UART3_RTS_B   0x1b0b1
+		>;
+	};
+
+	pinctrl_usbotg: usbotggrp {
+		fsl,pins = <
+			MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
+		>;
+	};
+
+	pinctrl_usdhc1: usdhc1grp {
+		fsl,pins = <
+			MX6QDL_PAD_SD1_CMD__SD1_CMD	0x17059
+			MX6QDL_PAD_SD1_CLK__SD1_CLK	0x10059
+			MX6QDL_PAD_SD1_DAT0__SD1_DATA0	0x17059
+			MX6QDL_PAD_SD1_DAT1__SD1_DATA1	0x17059
+			MX6QDL_PAD_SD1_DAT2__SD1_DATA2	0x17059
+			MX6QDL_PAD_SD1_DAT3__SD1_DATA3	0x17059
+			/* WL_EN */
+			MX6QDL_PAD_SD3_DAT7__GPIO6_IO17 0x17071
+			/* WL_IRQ */
+			MX6QDL_PAD_SD3_RST__GPIO7_IO08  0x17071
+		>;
+	};
+
+	pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
+		fsl,pins = <
+			MX6QDL_PAD_SD1_CMD__SD1_CMD	0x170B9
+			MX6QDL_PAD_SD1_CLK__SD1_CLK	0x100B9
+			MX6QDL_PAD_SD1_DAT0__SD1_DATA0	0x170B9
+			MX6QDL_PAD_SD1_DAT1__SD1_DATA1	0x170B9
+			MX6QDL_PAD_SD1_DAT2__SD1_DATA2	0x170B9
+			MX6QDL_PAD_SD1_DAT3__SD1_DATA3	0x170B9
+		>;
+	};
+
+	pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
+		fsl,pins = <
+			MX6QDL_PAD_SD1_CMD__SD1_CMD	0x170F9
+			MX6QDL_PAD_SD1_CLK__SD1_CLK	0x100F9
+			MX6QDL_PAD_SD1_DAT0__SD1_DATA0	0x170F9
+			MX6QDL_PAD_SD1_DAT1__SD1_DATA1	0x170F9
+			MX6QDL_PAD_SD1_DAT2__SD1_DATA2	0x170F9
+			MX6QDL_PAD_SD1_DAT3__SD1_DATA3	0x170F9
+		>;
+	};
+
+	pinctrl_usdhc2: usdhc2grp {
+		fsl,pins = <
+			MX6QDL_PAD_SD2_CMD__SD2_CMD	0x17059
+			MX6QDL_PAD_SD2_CLK__SD2_CLK	0x10059
+			MX6QDL_PAD_SD2_DAT0__SD2_DATA0	0x17059
+			MX6QDL_PAD_SD2_DAT1__SD2_DATA1	0x17059
+			MX6QDL_PAD_SD2_DAT2__SD2_DATA2	0x17059
+			MX6QDL_PAD_SD2_DAT3__SD2_DATA3	0x17059
+		>;
+	};
+
+	pinctrl_usdhc3: usdhc3grp {
+		fsl,pins = <
+			MX6QDL_PAD_SD3_CMD__SD3_CMD	0x17059
+			MX6QDL_PAD_SD3_CLK__SD3_CLK	0x10059
+			MX6QDL_PAD_SD3_DAT0__SD3_DATA0	0x17059
+			MX6QDL_PAD_SD3_DAT1__SD3_DATA1	0x17059
+			MX6QDL_PAD_SD3_DAT2__SD3_DATA2	0x17059
+			MX6QDL_PAD_SD3_DAT3__SD3_DATA3	0x17059
+		>;
+	};
+};
+
+&pcie {
+	fsl,tx-swing-full = <103>;
+	fsl,tx-swing-low = <103>;
+	reset-gpio = <&gpio4 11 GPIO_ACTIVE_LOW>;
+	status = "disabled";
+};
+
+&pwm2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_pwm2>;
+	status = "disabled";
+};
+
+&reg_arm {
+       vin-supply = <&sw1a_reg>;
+};
+
+&reg_pu {
+       vin-supply = <&sw1c_reg>;
+};
+
+&reg_soc {
+       vin-supply = <&sw1c_reg>;
+};
+
+&snvs_poweroff {
+	status = "okay";
+};
+
+&ssi2 {
+	status = "okay";
+};
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart1>;
+	status = "disabled";
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2 &pinctrl_bt>;
+	uart-has-rtscts;
+	status = "okay";
+
+	bluetooth {
+		compatible = "ti,wl1835-st";
+		enable-gpios = <&gpio6 18 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart3>;
+	uart-has-rtscts;
+	status = "disabled";
+};
+
+&usbh1 {
+	status = "disabled";
+};
+
+&usbotg {
+	vbus-supply = <&reg_usb_otg_vbus>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usbotg>;
+	disable-over-current;
+	status = "disabled";
+};
+
+&usdhc1 {
+	pinctrl-names = "default", "state_100mhz", "state_200mhz";
+	pinctrl-0 = <&pinctrl_usdhc1>;
+	pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
+	pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
+	bus-width = <4>;
+	vmmc-supply = <&reg_wl18xx_vmmc>;
+	non-removable;
+	wakeup-source;
+	keep-power-in-suspend;
+	cap-power-off-card;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	wlcore: wlcore at 2 {
+		compatible = "ti,wl1835";
+		reg = <2>;
+		interrupt-parent = <&gpio6>;
+		interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
+		ref-clock-frequency = <38400000>;
+	};
+};
+
+&usdhc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usdhc2>;
+	no-1-8-v;
+	keep-power-in-suspend;
+	wakeup-source;
+	status = "disabled";
+};
+
+&usdhc3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usdhc3>;
+	non-removable;
+	keep-power-in-suspend;
+	wakeup-source;
+	status = "okay";
+};
-- 
2.7.4

^ permalink raw reply related

* [PATCH v5 3/6] dt-bindings: display: Add bindings for SGD GKTW70SDAE4SE Panel
From: Neil Armstrong @ 2017-12-01  9:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1512119024-521-1-git-send-email-narmstrong@baylibre.com>

The GKTW70SDAE4SE is an LVDS display panel.
Their bindings are modelled on the the LVDS panel bindings.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../bindings/display/panel/sgd,gktw70sdae4se.txt   | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.txt

diff --git a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.txt b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.txt
new file mode 100644
index 0000000..d06644b
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.txt
@@ -0,0 +1,41 @@
+Solomon Goldentek Display GKTW70SDAE4SE LVDS Display Panel
+==========================================================
+
+The GKTW70SDAE4SE is a 7" WVGA TFT-LCD display panel.
+
+These DT bindings follow the LVDS panel bindings defined in panel-lvds.txt
+with the following device-specific properties.
+
+Required properties:
+
+- compatible: Shall contain "sgd,gktw70sdae4se" and "panel-lvds", in that order.
+
+Example
+-------
+
+panel {
+	compatible = "sgd,gktw70sdae4se", "panel-lvds";
+
+	width-mm = <153>;
+	height-mm = <86>;
+
+	data-mapping = "jeida-18";
+
+	panel-timing {
+		clock-frequency = <32000000>;
+		hactive = <800>;
+		vactive = <480>;
+		hback-porch = <39>;
+		hfront-porch = <39>;
+		vback-porch = <29>;
+		vfront-porch = <13>;
+		hsync-len = <47>;
+		vsync-len = <2>;
+	};
+
+	port {
+		panel_in: endpoint {
+			remote-endpoint = <&lvds_encoder>;
+		};
+	};
+};
-- 
2.7.4

^ permalink raw reply related

* [PATCH v5 2/6] dt-bindings: Add vendor prefix for Solomon Goldentek Display Corporation
From: Neil Armstrong @ 2017-12-01  9:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1512119024-521-1-git-send-email-narmstrong@baylibre.com>

Solomon Goldentek Display Corporation is a Taiwanese LCD/LCM manufacturer.
Company Site: http://www.goldentek.com.tw

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 0994bdd..b0d3bef 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -305,6 +305,7 @@ seagate	Seagate Technology PLC
 semtech	Semtech Corporation
 sensirion	Sensirion AG
 sff	Small Form Factor Committee
+sgd	Solomon Goldentek Display Corporation
 sgx	SGX Sensortech
 sharp	Sharp Corporation
 shimafuji	Shimafuji Electric, Inc.
-- 
2.7.4

^ permalink raw reply related

* [PATCH v5 1/6] ARM: dts: imx6qdl-pinfunc: Add missing MX6QDL_PAD_ENET_RXD0__OSC32K_32K_OUT
From: Neil Armstrong @ 2017-12-01  9:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1512119024-521-1-git-send-email-narmstrong@baylibre.com>

Add missing pinmux entry for OSC32K_32K_OUT on pad ENET_RXD0 used by the
Variscite DART-MX6 SoM.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm/boot/dts/imx6dl-pinfunc.h | 1 +
 arch/arm/boot/dts/imx6q-pinfunc.h  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/imx6dl-pinfunc.h b/arch/arm/boot/dts/imx6dl-pinfunc.h
index 0ead323..37e430a 100644
--- a/arch/arm/boot/dts/imx6dl-pinfunc.h
+++ b/arch/arm/boot/dts/imx6dl-pinfunc.h
@@ -668,6 +668,7 @@
 #define MX6QDL_PAD_ENET_RX_ER__SPDIF_IN             0x1f4 0x5c4 0x8f0 0x3 0x1
 #define MX6QDL_PAD_ENET_RX_ER__ENET_1588_EVENT2_OUT 0x1f4 0x5c4 0x000 0x4 0x0
 #define MX6QDL_PAD_ENET_RX_ER__GPIO1_IO24           0x1f4 0x5c4 0x000 0x5 0x0
+#define MX6QDL_PAD_ENET_RXD0__OSC32K_32K_OUT        0x1f8 0x5c8 0x000 0x0 0x0
 #define MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0         0x1f8 0x5c8 0x818 0x1 0x0
 #define MX6QDL_PAD_ENET_RXD0__ESAI_TX_HF_CLK        0x1f8 0x5c8 0x838 0x2 0x0
 #define MX6QDL_PAD_ENET_RXD0__SPDIF_OUT             0x1f8 0x5c8 0x000 0x3 0x0
diff --git a/arch/arm/boot/dts/imx6q-pinfunc.h b/arch/arm/boot/dts/imx6q-pinfunc.h
index 9fc6120..cfb11d3 100644
--- a/arch/arm/boot/dts/imx6q-pinfunc.h
+++ b/arch/arm/boot/dts/imx6q-pinfunc.h
@@ -551,6 +551,7 @@
 #define MX6QDL_PAD_ENET_RXD1__ESAI_TX_FS            0x1e0 0x4f4 0x860 0x2 0x0
 #define MX6QDL_PAD_ENET_RXD1__ENET_1588_EVENT3_OUT  0x1e0 0x4f4 0x000 0x4 0x0
 #define MX6QDL_PAD_ENET_RXD1__GPIO1_IO26            0x1e0 0x4f4 0x000 0x5 0x0
+#define MX6QDL_PAD_ENET_RXD0__OSC32K_32K_OUT        0x1e4 0x4f8 0x000 0x0 0x0
 #define MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0         0x1e4 0x4f8 0x848 0x1 0x1
 #define MX6QDL_PAD_ENET_RXD0__ESAI_TX_HF_CLK        0x1e4 0x4f8 0x868 0x2 0x0
 #define MX6QDL_PAD_ENET_RXD0__SPDIF_OUT             0x1e4 0x4f8 0x000 0x3 0x0
-- 
2.7.4

^ permalink raw reply related

* [PATCH v5 0/6] ARM: Add Variscite DART-MX6 SoM and Carrier-board support
From: Neil Armstrong @ 2017-12-01  9:03 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset adds support for the Variscite DART-MX6 SoM with :
- i.MX6 Quad or Dual Lite SoC
- 1Gb/2Gb LPDDR2
- 4-64 GB eMMC
- Camera Interface
- HDMI+CEC interface
- LVDS / DSI / Parallel RGB interfaces
- Ethernet RGMII interface
- On-SoM Wi-Fi/Bluetooth with WiLink wl1835 SDIO Module
- SD/MMC/SDIO interface
- USB Host + USB OTG interface
- I2C interfaces
- SPI interfaces
- PCI-Express 2.0 interface
- on-SoM Audio Codec with HP/Line-In interfaces + DMIC interface
- Digital Audio interface
- S/PDIF interface

And the Carrier-Board with the following :
- LVDS interface for the VLCD-CAP-GLD-LVDS 7" LCD 800 x 480 touch display
- HDMI Connector
- USB Host + USB OTG Connector
- 10/100/1000 Mbps Ethernet
- miniPCI-Express slot
- SD Card connector
- Audio Headphone/Line In jack connectors
- On-board DMIC
- CAN bus header
- SPI header
- Camera Interfaces header
- 4xButtons, 2xLeds
- OnBoard RTC with Coin Backup battery socket
- RS232 Header + USB-Serial debug port

First patch contains a missing pinmux define used by the SoM.
Last patch contains configs used by the SoM DT like SERDEV or WL18XX support.

PCIe, On-Board DMIC and Camera Interfaces are not handled yet.

Changes since v4 at [4]:
- Renamed coded label
- Updated gpio wakeup properties
- Removed useless panel blank lines
- Removed leading 0 in pmic node name address
- Changed last patch title to match imx defconfig name
- Fixed dtsi alphabetical ordering

Changes since v3 at [3]:
- minor pcie dt fix
- added tags

Changes since v2 at [2]:
- Added bindings acks
- fixed enable-active-high regulators property
- moved hdmi dd-i2c-bus to son dtsi
- fixed pinmux IOMUX value
- add pcie reset-gpio

Changes since v1 at [1]:
- Add lvds display vendor prefix and bindings
- fix all gpio phandle arguments with correct ACTIVE_XXX define
- drop pcie support
- drop custom operating points
- fix arm/pu/soc vin-supply instead of &cpu node override
- fix can pinmux value
- changed button node name
- add revied-by tags on first and last patches

[1] http://lkml.kernel.org/r/1511281705-30849-1-git-send-email-narmstrong at baylibre.com
[2] http://lkml.kernel.org/r/1511348560-28505-1-git-send-email-narmstrong at baylibre.com
[3] http://lkml.kernel.org/r/1511785716-23492-1-git-send-email-narmstrong at baylibre.com

Neil Armstrong (6):
  ARM: dts: imx6qdl-pinfunc: Add missing
    MX6QDL_PAD_ENET_RXD0__OSC32K_32K_OUT
  dt-bindings: Add vendor prefix for Solomon Goldentek Display
    Corporation
  dt-bindings: display: Add bindings for SGD GKTW70SDAE4SE Panel
  ARM: dts: imx6qdl: Add Variscite DART-MX6 SoM support
  ARM: dts: imx6q: Add Variscite DART-MX6 Carrier-board support
  ARM: imx_v6_v7_defconfig: Add missing config for DART-MX6 SoM

 .../bindings/display/panel/sgd,gktw70sdae4se.txt   |  41 ++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/imx6dl-pinfunc.h                 |   1 +
 arch/arm/boot/dts/imx6q-pinfunc.h                  |   1 +
 arch/arm/boot/dts/imx6q-var-dt6customboard.dts     | 236 ++++++++++
 arch/arm/boot/dts/imx6qdl-var-dart.dtsi            | 504 +++++++++++++++++++++
 arch/arm/configs/imx_v6_v7_defconfig               |   6 +
 8 files changed, 791 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.txt
 create mode 100644 arch/arm/boot/dts/imx6q-var-dt6customboard.dts
 create mode 100644 arch/arm/boot/dts/imx6qdl-var-dart.dtsi

-- 
2.7.4

^ permalink raw reply

* [PATCH v4 4/6] ARM: dts: imx6qdl: Add Variscite DART-MX6 SoM support
From: Philippe Ombredanne @ 2017-12-01  9:02 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <d30a3015-afbb-cd88-ee01-4222339a2807@baylibre.com>

On Fri, Dec 1, 2017 at 9:54 AM, Neil Armstrong <narmstrong@baylibre.com> wrote:
> On 30/11/2017 01:39, Shawn Guo wrote:
>> On Wed, Nov 29, 2017 at 11:20:55AM +0100, Neil Armstrong wrote:
>>> This patch adds support for the Variscite DART-MX6 SoM with :
>>> - i.MX6 Quad or Dual Lite SoC
>>> - 1Gb/2Gb LPDDR2
>>> - 4-64 GB eMMC
>>> - Camera Interface
>>> - HDMI+CEC interface
>>> - LVDS / DSI / Parallel RGB interfaces
>>> - Ethernet RGMII interface
>>> - On-SoM Wi-Fi/Bluetooth with WiLink wl1835 SDIO Module
>>> - SD/MMC/SDIO interface
>>> - USB Host + USB OTG interface
>>> - I2C interfaces
>>> - SPI interfaces
>>> - PCI-Express 2.0 interface
>>> - on-SoM Audio Codec with HP/Line-In interfaces + DMIC interface
>>> - Digital Audio interface
>>> - S/PDIF interface
>>>
>>> Product website : http://www.variscite.com/products/system-on-module-som/cortex-a9/dart-mx6-cpu-freescale-imx6
>>>
>>> Support is handled with a SoM-centric dtsi exporting the default interfaces
>>> along the default pinmuxing to be enabled by the board dts file.
>>>
>>> Only board-independent devices like WiFi, eMMC or PMIC are enabled in the dtsi.
>>>
>>> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>>
>> Looks pretty good.  Only a couple of minor comments.
>>
>>> ---
>>>  arch/arm/boot/dts/imx6qdl-var-dart.dtsi | 504 ++++++++++++++++++++++++++++++++
>>>  1 file changed, 504 insertions(+)
>>>  create mode 100644 arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>>
>>> diff --git a/arch/arm/boot/dts/imx6qdl-var-dart.dtsi b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>> new file mode 100644
>>> index 0000000..fd2520b
>>> --- /dev/null
>>> +++ b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>> @@ -0,0 +1,504 @@
>>> +/*
>>> + * Support for Variscite DART-MX6 Module
>>> + *
>>> + * Copyright 2017 BayLibre, SAS
>>> + * Author: Neil Armstrong <narmstrong@baylibre.com>
>>> + *
>>> + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>> + */

Should this be instead on the first line with a // comment style if
possible, right?

>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

Thomas has sent a first doc patch [1] set and is working on an updated
version.  Jonathan also wrote a nice background article on the topic
at LWN [2].

Linus explained why he wants the // comment style and a first line
location on the list too.

[1] https://marc.info/?l=linux-kernel&m=151051532322831&w=2
[2] https://lwn.net/SubscriberLink/739183/262749cbe307ddc7/

-- 
Cordially
Philippe Ombredanne

^ permalink raw reply

* [PATCH v4 6/6] ARM: configs: Add missing config for DART-MX6 SoM
From: Neil Armstrong @ 2017-12-01  8:57 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171130004629.GD22908@dragon>

Hi Shawn,

On 30/11/2017 01:46, Shawn Guo wrote:
> On Wed, Nov 29, 2017 at 11:20:57AM +0100, Neil Armstrong wrote:
>> This patch adds the missing configs for the DART-MX6 SoM support :
>> - SERDEV bluetooth driver + SERIAL_DEV_BUS configs
>> - WL18XX driver
>> - DEFAULT_ON Led Trigger
>>
>> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> 
> 'ARM: imx_v6_v7_defconfig: ...' or 'ARM: imx: defconfig: ...' please.
> 

Ok done.

Thanks for the review,

Neil

> Shawn
> 
>> ---
>>  arch/arm/configs/imx_v6_v7_defconfig | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
>> index 0d44949..abd06c3 100644
>> --- a/arch/arm/configs/imx_v6_v7_defconfig
>> +++ b/arch/arm/configs/imx_v6_v7_defconfig
>> @@ -80,6 +80,7 @@ CONFIG_CAN=y
>>  CONFIG_CAN_FLEXCAN=y
>>  CONFIG_BT=y
>>  CONFIG_BT_HCIUART=y
>> +CONFIG_BT_HCIUART_SERDEV=y
>>  CONFIG_BT_HCIUART_H4=y
>>  CONFIG_BT_HCIUART_LL=y
>>  CONFIG_CFG80211=y
>> @@ -155,6 +156,7 @@ CONFIG_USB_USBNET=y
>>  CONFIG_USB_NET_CDC_EEM=m
>>  CONFIG_BRCMFMAC=m
>>  CONFIG_WL12XX=m
>> +CONFIG_WL18XX=m
>>  CONFIG_WLCORE_SDIO=m
>>  # CONFIG_WILINK_PLATFORM_DATA is not set
>>  CONFIG_INPUT_EVDEV=y
>> @@ -185,6 +187,8 @@ CONFIG_SERIAL_IMX=y
>>  CONFIG_SERIAL_IMX_CONSOLE=y
>>  CONFIG_SERIAL_FSL_LPUART=y
>>  CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
>> +CONFIG_SERIAL_DEV_BUS=y
>> +CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
>>  # CONFIG_I2C_COMPAT is not set
>>  CONFIG_I2C_CHARDEV=y
>>  CONFIG_I2C_MUX=y
>> @@ -248,6 +252,7 @@ CONFIG_VIDEO_OV5640=m
>>  CONFIG_SOC_CAMERA_OV2640=y
>>  CONFIG_IMX_IPUV3_CORE=y
>>  CONFIG_DRM=y
>> +CONFIG_DRM_PANEL_LVDS=y
>>  CONFIG_DRM_PANEL_SIMPLE=y
>>  CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
>>  CONFIG_DRM_DW_HDMI_CEC=y
>> @@ -340,6 +345,7 @@ CONFIG_LEDS_TRIGGER_ONESHOT=y
>>  CONFIG_LEDS_TRIGGER_HEARTBEAT=y
>>  CONFIG_LEDS_TRIGGER_BACKLIGHT=y
>>  CONFIG_LEDS_TRIGGER_GPIO=y
>> +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
>>  CONFIG_RTC_CLASS=y
>>  CONFIG_RTC_INTF_DEV_UIE_EMUL=y
>>  CONFIG_RTC_DRV_DS1307=y
>> -- 
>> 2.7.4
>>

^ permalink raw reply

* [PATCH v4 5/6] ARM: dts: imx6q: Add Variscite DART-MX6 Carrier-board support
From: Neil Armstrong @ 2017-12-01  8:56 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171130004342.GC22908@dragon>

Hi Shawn,

On 30/11/2017 01:43, Shawn Guo wrote:
> On Wed, Nov 29, 2017 at 11:20:56AM +0100, Neil Armstrong wrote:
>> This patch adds support for the i.MX6 Quad variant of the Variscite DART-MX6
>> SoM Carrier-Board.
>>
>> This Carrier-Board has the following :
>> - LVDS interface for the VLCD-CAP-GLD-LVDS 7" LCD 800 x 480 touch display
>> - HDMI Connector
>> - USB Host + USB OTG Connector
>> - 10/100/1000 Mbps Ethernet
>> - miniPCI-Express slot
>> - SD Card connector
>> - Audio Headphone/Line In jack connectors
>> - On-board DMIC
>> - CAN bus header
>> - SPI header
>> - Camera Interfaces header
>> - 4xButtons, 2xLeds
>> - OnBoard RTC with Coin Backup battery socket
>> - RS232 Header + USB-Serial debug port
>>
>> Product Page : http://www.variscite.com/products/evaluation-kits/dart-mx6-kits
>>
>> The board support is done with all on-board and header interfaces enabled.
>> 7" LVDS Touchscreen is enabled by default along HDMI output.
>> Audio interface is supported with the "simple-card" bindings.
>>
>> PCIe slot, On-Board DMIC and Camera Interfaces are not handled yet.
>>
>> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>>  arch/arm/boot/dts/Makefile                     |   1 +
>>  arch/arm/boot/dts/imx6q-var-dt6customboard.dts | 239 +++++++++++++++++++++++++
>>  2 files changed, 240 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/imx6q-var-dt6customboard.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index d0381e9..148ff15 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -470,6 +470,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
>>  	imx6q-tx6q-11x0-mb7.dtb \
>>  	imx6q-udoo.dtb \
>>  	imx6q-utilite-pro.dtb \
>> +	imx6q-var-dt6customboard.dtb \
>>  	imx6q-wandboard.dtb \
>>  	imx6q-wandboard-revb1.dtb \
>>  	imx6q-wandboard-revd1.dtb \
>> diff --git a/arch/arm/boot/dts/imx6q-var-dt6customboard.dts b/arch/arm/boot/dts/imx6q-var-dt6customboard.dts
>> new file mode 100644
>> index 0000000..76faaff
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/imx6q-var-dt6customboard.dts
>> @@ -0,0 +1,239 @@
>> +/*
>> + * Support for Variscite DART-MX6 Carrier-board
>> + *
>> + * Copyright 2017 BayLibre, SAS
>> + * Author: Neil Armstrong <narmstrong@baylibre.com>
>> + *
>> + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "imx6q.dtsi"
>> +#include "imx6qdl-var-dart.dtsi"
>> +#include <dt-bindings/input/linux-event-codes.h>
>> +
>> +/ {
>> +	model = "Variscite DART-MX6 Carrier-board";
>> +	compatible = "variscite,dt6customboard", "fsl,imx6q";
>> +
>> +	backlight_lvds: backlight {
>> +		compatible = "pwm-backlight";
>> +		pwms = <&pwm2 0 50000>;
>> +		brightness-levels = <0 4 8 16 32 64 128 248>;
>> +		default-brightness-level = <7>;
>> +		status = "okay";
>> +	};
>> +
>> +	gpio-keys {
>> +		compatible = "gpio-keys";
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +		autorepeat;
>> +
>> +		back {
>> +			gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
>> +			linux,code = <KEY_BACK>;
>> +			label = "Key Back";
>> +			linux,input-type = <1>;
>> +			debounce-interval = <100>;
>> +			gpio-key,wakeup;
> 
> The gpio-key,wakeup is legacy one.  Use wakeup-source instead.

Fixed

> 
>> +		};
>> +
>> +		home {
>> +			gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;
>> +			linux,code = <KEY_HOME>;
>> +			label = "Key Home";
>> +			linux,input-type = <1>;
>> +			debounce-interval = <100>;
>> +			gpio-key,wakeup;
>> +		};
>> +
>> +		menu {
>> +			gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
>> +			linux,code = <KEY_MENU>;
>> +			label = "Key Menu";
>> +			linux,input-type = <1>;
>> +			debounce-interval = <100>;
>> +			gpio-key,wakeup;
>> +		};
>> +	};
>> +
>> +	gpio-leds {
>> +		compatible = "gpio-leds";
>> +
>> +		led1 {
>> +			gpios = <&gpio4 27 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "heartbeat";
>> +		};
>> +
>> +		led2 {
>> +			gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "default-on";
>> +		};
>> +	};
>> +
>> +	panel1: lvds-panel {
>> +		compatible = "sgd,gktw70sdae4se", "panel-lvds";
>> +		backlight = <&backlight_lvds>;
>> +
>> +		width-mm = <153>;
>> +		height-mm = <86>;
>> +
>> +		label = "gktw70sdae4se";
>> +
> 
> Nit: these lines in middle of property list is not really necessary.
> Can we drop them?

Dropped

Thanks,
Neil

> 
> Shawn
> 
>> +		data-mapping = "jeida-18";
>> +
>> +		panel-timing {
>> +			clock-frequency = <32000000>;
>> +			hactive = <800>;
>> +			vactive = <480>;
>> +			hback-porch = <39>;
>> +			hfront-porch = <39>;
>> +			vback-porch = <29>;
>> +			vfront-porch = <13>;
>> +			hsync-len = <47>;
>> +			vsync-len = <2>;
>> +		};
>> +
>> +		port {
>> +			panel_in: endpoint {
>> +				remote-endpoint = <&lvds1_out>;
>> +			};
>> +		};
>> +	};
>> +
>> +	reg_usb_h1_vbus: regulator-usbh1vbus {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "usb_h1_vbus";
>> +		regulator-min-microvolt = <5000000>;
>> +		regulator-max-microvolt = <5000000>;
>> +		gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
>> +		enable-active-high;
>> +	};
>> +
>> +	reg_usb_otg_vbus: regulator-usbotgvbus {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "usb_otg_vbus";
>> +		regulator-min-microvolt = <5000000>;
>> +		regulator-max-microvolt = <5000000>;
>> +		gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
>> +		enable-active-high;
>> +	};
>> +
>> +	sound {
>> +		compatible = "simple-audio-card";
>> +		simple-audio-card,name = "dt6-customboard-audio";
>> +		simple-audio-card,format = "i2s";
>> +		simple-audio-card,bitclock-master = <&sound_codec>;
>> +		simple-audio-card,frame-master = <&sound_codec>;
>> +		simple-audio-card,widgets = "Headphone", "Headphone Jack",
>> +					    "Line", "Line In";
>> +		simple-audio-card,routing = "Headphone Jack", "HPLOUT",
>> +					    "Headphone Jack", "HPROUT",
>> +					    "LINE1L", "Line In",
>> +					    "LINE1R", "Line In";
>> +
>> +		sound_cpu: simple-audio-card,cpu {
>> +			sound-dai = <&ssi2>;
>> +		};
>> +
>> +		sound_codec: simple-audio-card,codec {
>> +			sound-dai = <&codec>;

Changed with <&tlv320aic3106> here.

>> +			clocks = <&clks IMX6QDL_CLK_CKO>;
>> +		};
>> +	};
>> +};
>> +
>> +&can1 {
>> +	status = "okay";
>> +};
>> +
>> +&ecspi1 {
>> +	cs-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>,
>> +		   <&gpio4 10 GPIO_ACTIVE_HIGH>;
>> +	status = "okay";
>> +};
>> +
>> +&fec {
>> +	status = "okay";
>> +	phy-mode = "rgmii";
>> +	phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
>> +};
>> +
>> +&hdmi {
>> +	status = "okay";
>> +};
>> +
>> +&i2c1 {
>> +	clock-frequency = <100000>;
>> +	status = "okay";
>> +};
>> +
>> +&i2c3 {
>> +	clock-frequency = <100000>;
>> +	status = "okay";
>> +
>> +	touchscreen at 38 {
>> +		compatible = "edt,edt-ft5x06";
>> +		reg = <0x38>;
>> +		interrupt-parent = <&gpio1>;
>> +		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
>> +		touchscreen-size-x = <800>;
>> +		touchscreen-size-y = <480>;
>> +		touchscreen-inverted-x;
>> +		touchscreen-inverted-y;
>> +	};
>> +
>> +	rtc at 68 {
>> +		compatible = "isil,isl12057";
>> +		reg = <0x68>;
>> +	};
>> +};
>> +
>> +&ldb {
>> +	status = "okay";
>> +
>> +	lvds-channel at 1 {
>> +		status = "okay";
>> +
>> +		port at 4 {
>> +			reg = <4>;
>> +
>> +			lvds1_out: endpoint {
>> +				remote-endpoint = <&panel_in>;
>> +			};
>> +		};
>> +	};
>> +};
>> +
>> +&pwm2 {
>> +	status = "okay";
>> +};
>> +
>> +&uart1 {
>> +	status = "okay";
>> +};
>> +
>> +&uart3 {
>> +	status = "okay";
>> +};
>> +
>> +&usbh1 {
>> +	vbus-supply = <&reg_usb_h1_vbus>;
>> +	status = "okay";
>> +};
>> +
>> +&usbotg {
>> +	vbus-supply = <&reg_usb_otg_vbus>;
>> +	dr_mode = "otg";
>> +	srp-disable;
>> +	hnp-disable;
>> +	adp-disable;
>> +	status = "okay";
>> +};
>> +
>> +&usdhc2 {
>> +	cd-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
>> +	status = "okay";
>> +};
>> -- 
>> 2.7.4
>>

^ permalink raw reply

* [PATCH v4 4/6] ARM: dts: imx6qdl: Add Variscite DART-MX6 SoM support
From: Neil Armstrong @ 2017-12-01  8:54 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171130003912.GB22908@dragon>

On 30/11/2017 01:39, Shawn Guo wrote:
> On Wed, Nov 29, 2017 at 11:20:55AM +0100, Neil Armstrong wrote:
>> This patch adds support for the Variscite DART-MX6 SoM with :
>> - i.MX6 Quad or Dual Lite SoC
>> - 1Gb/2Gb LPDDR2
>> - 4-64 GB eMMC
>> - Camera Interface
>> - HDMI+CEC interface
>> - LVDS / DSI / Parallel RGB interfaces
>> - Ethernet RGMII interface
>> - On-SoM Wi-Fi/Bluetooth with WiLink wl1835 SDIO Module
>> - SD/MMC/SDIO interface
>> - USB Host + USB OTG interface
>> - I2C interfaces
>> - SPI interfaces
>> - PCI-Express 2.0 interface
>> - on-SoM Audio Codec with HP/Line-In interfaces + DMIC interface
>> - Digital Audio interface
>> - S/PDIF interface
>>
>> Product website : http://www.variscite.com/products/system-on-module-som/cortex-a9/dart-mx6-cpu-freescale-imx6
>>
>> Support is handled with a SoM-centric dtsi exporting the default interfaces
>> along the default pinmuxing to be enabled by the board dts file.
>>
>> Only board-independent devices like WiFi, eMMC or PMIC are enabled in the dtsi.
>>
>> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> 
> Looks pretty good.  Only a couple of minor comments.
> 
>> ---
>>  arch/arm/boot/dts/imx6qdl-var-dart.dtsi | 504 ++++++++++++++++++++++++++++++++
>>  1 file changed, 504 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>>
>> diff --git a/arch/arm/boot/dts/imx6qdl-var-dart.dtsi b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>> new file mode 100644
>> index 0000000..fd2520b
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
>> @@ -0,0 +1,504 @@
>> +/*
>> + * Support for Variscite DART-MX6 Module
>> + *
>> + * Copyright 2017 BayLibre, SAS
>> + * Author: Neil Armstrong <narmstrong@baylibre.com>
>> + *
>> + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> + */
>> +
>> +#include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/sound/fsl-imx-audmux.h>
>> +
>> +/ {
>> +	memory {
>> +		reg = <0x10000000 0x40000000>;
>> +	};
>> +
>> +	reg_3p3v: regulator-3p3v {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "3P3V";
>> +		regulator-min-microvolt = <3300000>;
>> +		regulator-max-microvolt = <3300000>;
>> +		regulator-always-on;
>> +	};
>> +
>> +	reg_wl18xx_vmmc: regulator-wl18xx {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vwl1807";
>> +		regulator-min-microvolt = <1800000>;
>> +		regulator-max-microvolt = <1800000>;
>> +		gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>;
>> +		enable-active-high;
>> +		startup-delay-us = <70000>;
>> +	};
>> +};
>> +
>> +&audmux {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_audmux>;
>> +	status = "okay";
>> +
>> +	ssi2 {
>> +		fsl,audmux-port = <1>;
>> +		fsl,port-config = <
>> +			(IMX_AUDMUX_V2_PTCR_SYN |
>> +			IMX_AUDMUX_V2_PTCR_TFSDIR |
>> +			IMX_AUDMUX_V2_PTCR_TFSEL(2) |
>> +			IMX_AUDMUX_V2_PTCR_TCLKDIR |
>> +			IMX_AUDMUX_V2_PTCR_TCSEL(2))
>> +			IMX_AUDMUX_V2_PDCR_RXDSEL(2)
>> +		>;
>> +	};
>> +
>> +	aud3 {
>> +		fsl,audmux-port = <2>;
>> +		fsl,port-config = <
>> +			IMX_AUDMUX_V2_PTCR_SYN
>> +			IMX_AUDMUX_V2_PDCR_RXDSEL(1)
>> +		>;
>> +	};
>> +};
>> +
>> +&can1 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_flexcan1>;
>> +	status = "disabled";
>> +};
>> +
>> +&can2 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_flexcan2>;
>> +	status = "disabled";
>> +};
>> +
>> +&ecspi1 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_ecspi1>;
>> +	status = "disabled";
>> +};
>> +
>> +&fec {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_enet>;
>> +	phy-mode = "rgmii";
>> +	status = "disabled";
>> +};
>> +
>> +&hdmi {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_hdmicec>;
>> +	ddc-i2c-bus = <&i2c1>;
>> +	status = "disabled";
>> +};
>> +
>> +&i2c1 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_i2c1>;
>> +	status = "disabled";
>> +};
>> +
>> +&i2c2 {
>> +	clock-frequency = <100000>;
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_i2c2>;
>> +	status = "okay";
>> +
>> +	pmic at 08 {
> 
> Please drop the leading zero in unit-address.

Fixed

> 
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&pinctrl_pmic>;
>> +		compatible = "fsl,pfuze100";
>> +		reg = <0x08>;
>> +
>> +		regulators {
>> +			sw1a_reg: sw1ab {
>> +				regulator-min-microvolt = <300000>;
>> +				regulator-max-microvolt = <1875000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +				regulator-ramp-delay = <6250>;
>> +			};
>> +
>> +			sw1c_reg: sw1c {
>> +				regulator-min-microvolt = <300000>;
>> +				regulator-max-microvolt = <1875000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +				regulator-ramp-delay = <6250>;
>> +			};
>> +
>> +			sw2_reg: sw2 {
>> +				regulator-min-microvolt = <800000>;
>> +				regulator-max-microvolt = <3300000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			sw3a_reg: sw3a {
>> +				regulator-min-microvolt = <800000>;
>> +				regulator-max-microvolt = <3950000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			sw3b_reg: sw3b {
>> +				regulator-min-microvolt = <800000>;
>> +				regulator-max-microvolt = <3950000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			sw4_reg: sw4 {
>> +				regulator-min-microvolt = <800000>;
>> +				regulator-max-microvolt = <3950000>;
>> +			};
>> +
>> +			snvs_reg: vsnvs {
>> +				regulator-min-microvolt = <1200000>;
>> +				regulator-max-microvolt = <3000000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			vref_reg: vrefddr {
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			vgen6_reg: vgen6 {
>> +				regulator-min-microvolt = <2800000>;
>> +				regulator-max-microvolt = <2800000>;
>> +				regulator-always-on;
>> +				regulator-boot-on;
>> +			};
>> +		};
>> +	};
>> +
>> +	codec: codec at 1b {
> 
> Label should be something specific, maybe tlv320aic3106?

Changed to tlv320aic3106 and in the dts file

> 
>> +		compatible = "ti,tlv320aic3106";
>> +		reg = <0x1b>;
>> +		#sound-dai-cells = <0>;
>> +		DRVDD-supply = <&reg_3p3v>;
>> +		AVDD-supply = <&reg_3p3v>;
>> +		IOVDD-supply = <&reg_3p3v>;
>> +		DVDD-supply = <&reg_3p3v>;
>> +		ai3x-ocmv = <0>;
>> +		gpio-reset = <&gpio5 5 GPIO_ACTIVE_LOW>;
>> +	};
>> +};
>> +
>> +&i2c3 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_i2c3>;
>> +	status = "disabled";
>> +};
>> +
>> +&iomuxc {
>> +	pinctrl_audmux: audmux {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_CSI0_DAT7__AUD3_RXD		0x130b0
>> +			MX6QDL_PAD_CSI0_DAT4__AUD3_TXC		0x130b0
>> +			MX6QDL_PAD_CSI0_DAT5__AUD3_TXD		0x110b0
>> +			MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS		0x130b0
>> +			/* Audio Clock */
>> +			MX6QDL_PAD_GPIO_0__CCM_CLKO1		0x130b0
>> +		>;
>> +	};
>> +
>> +	pinctrl_bt: bt {
>> +		fsl,pins = <
>> +			/* Bluetooth enable */
>> +			MX6QDL_PAD_SD3_DAT6__GPIO6_IO18		0x1b0b1
>> +			/* Bluetooth Slow Clock */
>> +			MX6QDL_PAD_ENET_RXD0__OSC32K_32K_OUT	0x000b0
>> +		>;
>> +	};
>> +
>> +	pinctrl_ecspi1: ecspi1grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_KEY_COL1__ECSPI1_MISO	0x100b1
>> +			MX6QDL_PAD_KEY_ROW0__ECSPI1_MOSI	0x100b1
>> +			MX6QDL_PAD_KEY_COL0__ECSPI1_SCLK	0x100b1
>> +			/* SPI1 CS0 */
>> +			MX6QDL_PAD_KEY_ROW1__GPIO4_IO09		0x1b0b0
>> +			/* SPI1 CS1 */
>> +			MX6QDL_PAD_KEY_COL2__GPIO4_IO10		0x1b0b0
>> +		>;
>> +	};
>> +
>> +	pinctrl_enet: enetgrp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_ENET_MDIO__ENET_MDIO		0x100b0
>> +			MX6QDL_PAD_ENET_MDC__ENET_MDC		0x100b0
>> +			MX6QDL_PAD_RGMII_TXC__RGMII_TXC		0x10030
>> +			MX6QDL_PAD_RGMII_TD0__RGMII_TD0		0x10030
>> +			MX6QDL_PAD_RGMII_TD1__RGMII_TD1		0x10030
>> +			MX6QDL_PAD_RGMII_TD2__RGMII_TD2		0x10030
>> +			MX6QDL_PAD_RGMII_TD3__RGMII_TD3		0x10030
>> +			MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL	0x10030
>> +			MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK	0x100b0
>> +			MX6QDL_PAD_RGMII_RXC__RGMII_RXC		0x1b030
>> +			MX6QDL_PAD_RGMII_RD0__RGMII_RD0		0x1b030
>> +			MX6QDL_PAD_RGMII_RD1__RGMII_RD1		0x1b030
>> +			MX6QDL_PAD_RGMII_RD2__RGMII_RD2		0x1b030
>> +			MX6QDL_PAD_RGMII_RD3__RGMII_RD3		0x1b030
>> +			MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL	0x1b030
>> +		>;
>> +	};
>> +
>> +	pinctrl_flexcan1: flexcan1grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_GPIO_7__FLEXCAN1_TX	0x1b0b0
>> +			MX6QDL_PAD_GPIO_8__FLEXCAN1_RX	0x1b0b0
>> +		>;
>> +	};
>> +
>> +	pinctrl_flexcan2: flexcan2grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX	0x1b0b0
>> +			MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX	0x1b0b0
>> +		>;
>> +	};
>> +
>> +	pinctrl_hdmicec: hdmicecgrp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE	0x1f8b0
>> +		>;
>> +	};
>> +
>> +	pinctrl_i2c1: i2c1grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_CSI0_DAT8__I2C1_SDA	0x4001b8b1
>> +			MX6QDL_PAD_CSI0_DAT9__I2C1_SCL	0x4001b8b1
>> +		>;
>> +	};
>> +
>> +	pinctrl_i2c2: i2c2grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_KEY_COL3__I2C2_SCL	0x4001b8b1
>> +			MX6QDL_PAD_KEY_ROW3__I2C2_SDA	0x4001b8b1
>> +		>;
>> +	};
>> +
>> +	pinctrl_i2c3: i2c3grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_GPIO_5__I2C3_SCL	0x4001b8b1
>> +			MX6QDL_PAD_GPIO_16__I2C3_SDA	0x4001b8b1
>> +		>;
>> +	};
>> +
>> +	pinctrl_pmic: pmicgrp {
>> +		fsl,pins = <
>> +			/* PMIC INT */
>> +			MX6QDL_PAD_GPIO_17__GPIO7_IO12	0x1b0b1
>> +		>;
>> +	};
>> +
>> +	pinctrl_pwm2: pwm2grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_DISP0_DAT9__PWM2_OUT	0x1b0b1
>> +		>;
>> +	};
>> +
>> +	pinctrl_uart1: uart1grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
>> +			MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
>> +		>;
>> +	};
>> +
>> +	pinctrl_uart2: uart2grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_SD3_DAT4__UART2_RX_DATA	0x1b0b1
>> +			MX6QDL_PAD_SD3_DAT5__UART2_TX_DATA	0x1b0b1
>> +			MX6QDL_PAD_SD4_DAT6__UART2_CTS_B	0x1b0b1
>> +			MX6QDL_PAD_SD4_DAT5__UART2_RTS_B	0x1b0b1
>> +		>;
>> +	};
>> +
>> +	pinctrl_uart3: uart3grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
>> +			MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
>> +			MX6QDL_PAD_EIM_D23__UART3_CTS_B   0x1b0b1
>> +			MX6QDL_PAD_EIM_EB3__UART3_RTS_B   0x1b0b1
>> +		>;
>> +	};
>> +
>> +	pinctrl_usbotg: usbotggrp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
>> +		>;
>> +	};
>> +
>> +	pinctrl_usdhc1: usdhc1grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_SD1_CMD__SD1_CMD	0x17059
>> +			MX6QDL_PAD_SD1_CLK__SD1_CLK	0x10059
>> +			MX6QDL_PAD_SD1_DAT0__SD1_DATA0	0x17059
>> +			MX6QDL_PAD_SD1_DAT1__SD1_DATA1	0x17059
>> +			MX6QDL_PAD_SD1_DAT2__SD1_DATA2	0x17059
>> +			MX6QDL_PAD_SD1_DAT3__SD1_DATA3	0x17059
>> +			/* WL_EN */
>> +			MX6QDL_PAD_SD3_DAT7__GPIO6_IO17 0x17071
>> +			/* WL_IRQ */
>> +			MX6QDL_PAD_SD3_RST__GPIO7_IO08  0x17071
>> +		>;
>> +	};
>> +
>> +	pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_SD1_CMD__SD1_CMD	0x170B9
>> +			MX6QDL_PAD_SD1_CLK__SD1_CLK	0x100B9
>> +			MX6QDL_PAD_SD1_DAT0__SD1_DATA0	0x170B9
>> +			MX6QDL_PAD_SD1_DAT1__SD1_DATA1	0x170B9
>> +			MX6QDL_PAD_SD1_DAT2__SD1_DATA2	0x170B9
>> +			MX6QDL_PAD_SD1_DAT3__SD1_DATA3	0x170B9
>> +		>;
>> +	};
>> +
>> +	pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_SD1_CMD__SD1_CMD	0x170F9
>> +			MX6QDL_PAD_SD1_CLK__SD1_CLK	0x100F9
>> +			MX6QDL_PAD_SD1_DAT0__SD1_DATA0	0x170F9
>> +			MX6QDL_PAD_SD1_DAT1__SD1_DATA1	0x170F9
>> +			MX6QDL_PAD_SD1_DAT2__SD1_DATA2	0x170F9
>> +			MX6QDL_PAD_SD1_DAT3__SD1_DATA3	0x170F9
>> +		>;
>> +	};
>> +
>> +	pinctrl_usdhc2: usdhc2grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_SD2_CMD__SD2_CMD	0x17059
>> +			MX6QDL_PAD_SD2_CLK__SD2_CLK	0x10059
>> +			MX6QDL_PAD_SD2_DAT0__SD2_DATA0	0x17059
>> +			MX6QDL_PAD_SD2_DAT1__SD2_DATA1	0x17059
>> +			MX6QDL_PAD_SD2_DAT2__SD2_DATA2	0x17059
>> +			MX6QDL_PAD_SD2_DAT3__SD2_DATA3	0x17059
>> +		>;
>> +	};
>> +
>> +	pinctrl_usdhc3: usdhc3grp {
>> +		fsl,pins = <
>> +			MX6QDL_PAD_SD3_CMD__SD3_CMD	0x17059
>> +			MX6QDL_PAD_SD3_CLK__SD3_CLK	0x10059
>> +			MX6QDL_PAD_SD3_DAT0__SD3_DATA0	0x17059
>> +			MX6QDL_PAD_SD3_DAT1__SD3_DATA1	0x17059
>> +			MX6QDL_PAD_SD3_DAT2__SD3_DATA2	0x17059
>> +			MX6QDL_PAD_SD3_DAT3__SD3_DATA3	0x17059
>> +		>;
>> +	};
>> +};
>> +
>> +&pcie {
>> +	fsl,tx-swing-full = <103>;
>> +	fsl,tx-swing-low = <103>;
>> +	reset-gpio = <&gpio4 11 GPIO_ACTIVE_LOW>;
>> +	status = "disabled";
>> +};
>> +
>> +&pwm2 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_pwm2>;
>> +	status = "disabled";
>> +};
>> +
>> +&reg_arm {
>> +       vin-supply = <&sw1a_reg>;
>> +};
>> +
>> +&reg_pu {
>> +       vin-supply = <&sw1c_reg>;
>> +};
>> +
>> +&reg_soc {
>> +       vin-supply = <&sw1c_reg>;
>> +};
>> +
>> +&uart1 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_uart1>;
>> +	status = "disabled";
>> +};
>> +
>> +&uart2 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_uart2 &pinctrl_bt>;
>> +	uart-has-rtscts;
>> +	status = "okay";
>> +
>> +	bluetooth {
>> +		compatible = "ti,wl1835-st";
>> +		enable-gpios = <&gpio6 18 GPIO_ACTIVE_HIGH>;
>> +	};
>> +};
>> +
>> +&uart3 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_uart3>;
>> +	uart-has-rtscts;
>> +	status = "disabled";
>> +};
>> +
>> +&usbh1 {
>> +	status = "disabled";
>> +};
>> +
>> +&usbotg {
>> +	vbus-supply = <&reg_usb_otg_vbus>;
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_usbotg>;
>> +	disable-over-current;
>> +	status = "disabled";
>> +};
>> +
>> +&usdhc1 {
>> +	pinctrl-names = "default", "state_100mhz", "state_200mhz";
>> +	pinctrl-0 = <&pinctrl_usdhc1>;
>> +	pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
>> +	pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
>> +	bus-width = <4>;
>> +	vmmc-supply = <&reg_wl18xx_vmmc>;
>> +	non-removable;
>> +	wakeup-source;
>> +	keep-power-in-suspend;
>> +	cap-power-off-card;
>> +	#address-cells = <1>;
>> +	#size-cells = <0>;
>> +	status = "okay";
>> +
>> +	wlcore: wlcore at 2 {
>> +		compatible = "ti,wl1835";
>> +		reg = <2>;
>> +		interrupt-parent = <&gpio6>;
>> +		interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
>> +		ref-clock-frequency = <38400000>;
>> +	};
>> +};
>> +
>> +&usdhc2 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_usdhc2>;
>> +	no-1-8-v;
>> +	keep-power-in-suspend;
>> +	wakeup-source;
>> +	status = "disabled";
>> +};
>> +
>> +&usdhc3 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_usdhc3>;
>> +	non-removable;
>> +	keep-power-in-suspend;
>> +	wakeup-source;
>> +	status = "okay";
>> +};
>> +
>> +&ssi2 {
>> +	status = "okay";
>> +};
>> +
>> +&snvs_poweroff {
>> +	status = "okay";
>> +};
> 
> The last two nodes break the alphabetical order.

Fixed

> 
> Shawn
>> -- 
>> 2.7.4
>>

^ permalink raw reply

* [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support
From: Philippe Ombredanne @ 2017-12-01  8:41 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171201075421.33pgum4jjcvjxuju@flea.lan>

Dear Jagan,

On Fri, Dec 1, 2017 at 8:54 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Fri, Dec 01, 2017 at 12:12:14AM +0530, Jagan Teki wrote:
[]
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> new file mode 100644
>> index 0000000..f5303a3
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> @@ -0,0 +1,244 @@
>> +/*
>> + * Copyright (C) 2017 Jagan Teki <jagan@amarulasolutions.com>
>> + *
>> + * This file is dual-licensed: you can use it either under the terms
>> + * of the GPL or the X11 license, at your option. Note that this dual
>> + * licensing only applies to this file, and not this project as a
>> + * whole.
>> + *
>> + *  a) This library is free software; you can redistribute it and/or
>> + *     modify it under the terms of the GNU General Public License as
>> + *     published by the Free Software Foundation; either version 2 of the
>> + *     License, or (at your option) any later version.
>> + *
>> + *     This library is distributed in the hope that it will be useful,
>> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + *     GNU General Public License for more details.
>> + *
>> + * Or, alternatively,
>> + *
>> + *  b) Permission is hereby granted, free of charge, to any person
>> + *     obtaining a copy of this software and associated documentation
>> + *     files (the "Software"), to deal in the Software without
>> + *     restriction, including without limitation the rights to use,
>> + *     copy, modify, merge, publish, distribute, sublicense, and/or
>> + *     sell copies of the Software, and to permit persons to whom the
>> + *     Software is furnished to do so, subject to the following
>> + *     conditions:
>> + *
>> + *     The above copyright notice and this permission notice shall be
>> + *     included in all copies or substantial portions of the Software.
>> + *
>> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + *     OTHER DEALINGS IN THE SOFTWARE.
>> + */

Have you considered replacing this fine licensing boilerplate by the
new concise and cleaner SPDX ids?
Could it make sense, especially for new files, to avoid adding
boilerplate that will need to be cleaned up later?
You could get rid of these 37 lines and use this shorthand instead,
using the new conventions started by greg-kh and documented by tglx?

>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +// Copyright (c) 2017 Jagan Teki <jagan@amarulasolutions.com>


Thomas has sent a first doc patch [1] set and is working on an updated
version.  Jonathan also wrote a nice background article on the topic
at LWN [2].

And as a bonus, this device tree addition of yours minus this
boilerplate could save a few real trees if someone ever prints --god
forbid-- this file, so you would be making a good thing for the
planet! And consider too the energy savings from not having these
extra bytes transferred million of times and not retrieved from disks
spindles.

[1] https://marc.info/?l=linux-kernel&m=151051532322831&w=2
[2] https://lwn.net/SubscriberLink/739183/262749cbe307ddc7/
-- 
Cordially
Philippe Ombredanne

^ permalink raw reply

* [PATCH v2 0/4] ARM: dts: renesas: Convert to named i2c-gpio bindings
From: Simon Horman @ 2017-12-01  8:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1512046646-15253-1-git-send-email-geert+renesas@glider.be>

On Thu, Nov 30, 2017 at 01:57:22PM +0100, Geert Uytterhoeven wrote:
> 	Hi Simon, Magnus,
> 
> Commits 7d29f509d2cfd807 ("dt-bindings: i2c: i2c-gpio: Add support for
> named gpios") and 05c74778858d7d99 ("i2c: gpio: Add support for named
> gpios in DT") introduced named i2c-gpio DT bindings, and deprecated the
> more error-prone unnamed variant.
> 
> This patch series switches all Renesas boards to the new bindings, and
> adds the missing GPIO_OPEN_DRAIN I/O flags, which were implicitly
> assumed before.  The latter gets rid of messages like:
> 
>     gpio-208 (?): enforced open drain please flag it properly in DT/ACPI DSDT/board file
>     gpio-91 (?): enforced open drain please flag it properly in DT/ACPI DSDT/board file
> 
> Patch 1 was extracted from series "[PATCH/RFC 0/3] i2c: gpio: Add
> support for named gpios in DT", hence the v2.  All other patches are
> new.
> 
> Note that after this series is applied, the i2c-gpio buses are no longer
> detected when booting new DTBs on old (v4.14 and older) kernels, which
> should not be an issue.  Booting old DTBs on new kernels is not
> affected.
> 
> Thanks for applying!

Thanks, applied.

^ permalink raw reply

* [PATCH v3 1/4] omapdrm: panel: fix compatible vendor string for td028ttec1
From: Tomi Valkeinen @ 2017-12-01  8:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171201015730.nvw6sblxn566dhhb@rob-hp-laptop>

On 01/12/17 03:57, Rob Herring wrote:

>> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
>> index 0a38a0e8c925..a0dfa14f4fab 100644
>> --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
>> +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
>> @@ -452,6 +452,8 @@ static int td028ttec1_panel_remove(struct spi_device *spi)
>>  }
>>  
>>  static const struct of_device_id td028ttec1_of_match[] = {
>> +	{ .compatible = "omapdss,tpo,td028ttec1", },
> 
> Why the omapdss part?

This driver is omapdrm specific. But I don't want the dts file to have
omapdrm specific compatible strings, so that the dts files do not have
to be changed when in the future we move to common DRM panel drivers

So:

- In the .dts, we have compatible = "tpo,td028ttec1"
- At early boot time, we append "omapdss," to compatible strings for
panels connected to the DSS node.
- The omapdrm specific drivers match to "omapdss,tpo,td028ttec1"

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply

* [PATCH v3 4/4] DTS: Pandora: fix panel compatibility string
From: Tomi Valkeinen @ 2017-12-01  8:13 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171130220633.imkfyeiqtftnw4j4@earth>

On 01/12/17 00:06, Sebastian Reichel wrote:

>>>> How about let's call it a "typo fix" then? :)
>>>
>>> Well, it is not really a typo.
>>
>> Well what if the stable people pick it into earlier stable series
>> based on the word fix in the subject? That has happened before.
>>
>> I suggest you update the dts patches to use wording like
>> "update compatible to use new naming" or something similar.
> 
> Patch 4/4 is a Fix and should be applied to stable trees. "omapdss,"
> prefix was never supposed to be in the DTS files, is not supposed to
> be in there now and will break some time in the future.
> 
> Explanation: The early init of omapdss adds the prefix at runtime,
> so that the binding can use generic properties and the kernel can
> use omapdss specific drivers until the generic ones can be used

This is true, but the extra "omapdss" does not cause any issues at the
moment, and the time when it causes issues is still many kernel versions
in the future.

But, yes, thinking about this, I agree, it's better to pick this one
separately as a fix (after rebasing it on top of current maineline so
that it doesn't depend on the toppoly name change), and leaving the
toppoly->tpo change as a cleanup.

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox