From patchwork Wed Aug 26 18:13:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 7079191 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 962019F372 for ; Wed, 26 Aug 2015 18:14:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A87F208CA for ; Wed, 26 Aug 2015 18:14:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EA8A2094D for ; Wed, 26 Aug 2015 18:14:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752714AbbHZSN6 (ORCPT ); Wed, 26 Aug 2015 14:13:58 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:57359 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbbHZSNz (ORCPT ); Wed, 26 Aug 2015 14:13:55 -0400 Received: from ayla.of.borg ([31.5.182.137]) by michel.telenet-ops.be with bizsmtp id 9WDt1r00t2yGKqv06WDtuU; Wed, 26 Aug 2015 20:13:53 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1ZUfCr-0004Hv-Ev; Wed, 26 Aug 2015 20:13:53 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1ZUfCt-0004bV-W8; Wed, 26 Aug 2015 20:13:55 +0200 From: Geert Uytterhoeven To: Kuninori Morimoto , Simon Horman , Magnus Damm Cc: linux-sh@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 6/6] [POC] arm64: renesas: salvator-x dts: Add overlay for HSCIF1 Date: Wed, 26 Aug 2015 20:13:52 +0200 Message-Id: <1440612832-17627-7-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440612832-17627-1-git-send-email-geert+renesas@glider.be> References: <1440612832-17627-1-git-send-email-geert+renesas@glider.be> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On r8a7795/Salvator-X, both SCIF1 and HSCIF1 can be routed to the "DEBUG SERIAL-1" connector. The standard DTS provides access to SCIF1. Add an overlay to use HSCIF1 instead. Not-yet-signed-off-by: Geert Uytterhoeven --- This is a proof-of-concept, which depends on: - https://github.com/pantoniou/linux-beagle-track-mainline.git#bbb-overlays, - kbuild: Create a rule for building device tree overlay objects (https://lkml.org/lkml/2015/5/12/343), - Passing -@ to dtc, - [RFC] of/dynamic: Update list of aliases on aliases changes. --- arch/arm64/boot/dts/renesas/Makefile | 5 ++ .../dts/renesas/r8a7795-salvator-x-hscif1.dtso | 57 ++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/r8a7795-salvator-x-hscif1.dtso diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile index dbacc64e3c10fcd7..a880e3f07c850b6f 100644 --- a/arch/arm64/boot/dts/renesas/Makefile +++ b/arch/arm64/boot/dts/renesas/Makefile @@ -1,5 +1,10 @@ dtb-$(CONFIG_ARCH_RCAR_GEN3) += r8a7795-salvator-x.dtb +ifeq ($(CONFIG_OF_OVERLAY),y) +dtb-$(CONFIG_ARCH_RCAR_GEN3) += \ + r8a7795-salvator-x-hscif1.dtbo +endif + always := $(dtb-y) subdir-y := $(dts-dirs) clean-files := *.dtb diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x-hscif1.dtso b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x-hscif1.dtso new file mode 100644 index 0000000000000000..da833c6406ae3390 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x-hscif1.dtso @@ -0,0 +1,57 @@ +/* + * Device Tree Overlay for HSCIF1 on r8a7795/Salvator-X Debug Serial 1 + * + * Copyright (C) 2015 Glider bvba + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + * + * Notes: + * - As these pins are shared with SCIF1, the latter is disabled first. + */ + +/dts-v1/; +/plugin/; + +/ { + fragment@0 { + target-path = "/aliases"; + + __overlay__ { + /* serial1 = &hscif1; */ + serial1 = "/soc/serial@e6550000"; + }; + }; + + fragment@1 { + target = <&pfc>; + + __overlay__ { + hscif1_pins: hscif1 { + renesas,groups = "hscif1_data_a", + "hscif1_ctrl_a"; + renesas,function = "hscif1"; + }; + }; + }; + + fragment@2 { + target = <&scif1>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@3 { + target = <&hscif1>; + + __overlay__ { + pinctrl-0 = <&hscif1_pins>; + pinctrl-names = "default"; + + status = "okay"; + }; + }; +};