Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp802575pxb; Tue, 3 Nov 2020 12:58:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYLY1R5xBbMD0VCGzp2spWjOHuBNJUYqN4BASOsupoaGufCzObTfCY6k4ojnMPIK7JkRHi X-Received: by 2002:a50:ef12:: with SMTP id m18mr23787763eds.313.1604437128358; Tue, 03 Nov 2020 12:58:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604437128; cv=none; d=google.com; s=arc-20160816; b=AStZoIfpjnM9sFRLmZFMXdft75wUzC60/v5DfPjvFUBA7XIUGVIkALlemtfl4meXC2 t2iaan+L2HE1kiLo4zM9YFzTKrUowDFE9sjf0SQjgTxBNDv4sJa07n5mZIVqNHom35uc jw7f6aetQ9ejMBSRuOiX9LkKljF1NR1tNXfMGzIxjBaCRfTTY3ikUjcmJVDrh9ydguNP EJVKh4IqU/VtZZaO1tjn22BuJEPqN6UdK3jX+F/VT2rZqJ7GLxOKNUJYpwh/cF2VVHef c4NWydFwz9gdbbqgBo+yhwXuh/YpAr5x8nm6++aeWxbJ6bJRe6bYlBu0j/c5iZNO3/gF 0uTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/6zvAohz0HuohdBWPH6iG3BpN2OOyHIXe8OsWnH5wgg=; b=nChEHuWo0u2ET3MpigJjqIPkrATfa8iL+GdctBZUniqarJfz3CIS1wOX4hH6fxTGmo ae8vgF0BK1WzlZP+eTceMouiARydIKblhuzkMeffsEHtXdWhSMDROfuF5dQFZF5qc4TV FX7p1uo95Ii53aToCjb5wFoDwXodjUkd7QN59NuG9SZ1dAhJ6WNSsth1T/Kwioci3le1 lBUAyoUzpzNY5K85cJUEnPxqMlRkR3lS/3vir3q/UfKZYSMbh1FtrQQY4xy7BJifVQ1o 4qYkRRvgaaWU6tegFKtI7tzSlTA5zeYVTZ4ZftcnUHka3ohiouCGFlZL7hAGfrfp9VGQ ciEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si2059ejv.189.2020.11.03.12.58.24; Tue, 03 Nov 2020 12:58:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730942AbgKCUxu (ORCPT + 99 others); Tue, 3 Nov 2020 15:53:50 -0500 Received: from leonov.paulk.fr ([185.233.101.22]:57398 "EHLO leonov.paulk.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730316AbgKCUxq (ORCPT ); Tue, 3 Nov 2020 15:53:46 -0500 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 8AEBDBFBC2; Tue, 3 Nov 2020 21:53:43 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 03550C1D43; Tue, 3 Nov 2020 21:53:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id EC3D2C1D4F; Tue, 3 Nov 2020 21:51:01 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Rob Herring , Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Paul Kocialkowski , Matteo Scordino Subject: [PATCH v2 6/6] ARM: dts: sun8i-v3: Add support for the SL631 Action Camera with IMX179 Date: Tue, 3 Nov 2020 21:50:58 +0100 Message-Id: <20201103205058.435207-7-contact@paulk.fr> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201103205058.435207-1-contact@paulk.fr> References: <20201103205058.435207-1-contact@paulk.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The SL631 is a family of Allwinner V3 action cameras sold under various names, such as SJCAM SJ4000 Air or F60 Action Camera. Devices in this family share a common board design but can be found with different image sensors, including the IMX179 and the OV4689. This adds support for a common dtsi for the SL631 family as well as a specific dts for the IMX179 fashion, which will later be populated with an IMX179 node when a driver is available. Features that were tested on the device include: - UART debug - MMC - USB peripheral (e.g. g_ether) - Buttons - SPI NOR flash Note that the exact designer/vendor of these boards is unknown. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts | 12 ++ arch/arm/boot/dts/sun8i-v3-sl631.dtsi | 138 ++++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts create mode 100644 arch/arm/boot/dts/sun8i-v3-sl631.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 4363ba564bb4..b76bcda9a9df 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1196,6 +1196,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-s3-lichee-zero-plus.dtb \ sun8i-s3-pinecube.dtb \ sun8i-t3-cqa3t-bv3.dtb \ + sun8i-v3-sl631-imx179.dtb \ sun8i-v3s-licheepi-zero.dtb \ sun8i-v3s-licheepi-zero-dock.dtb \ sun8i-v40-bananapi-m2-berry.dtb diff --git a/arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts b/arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts new file mode 100644 index 000000000000..117aeece4e55 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR X11) +/* + * Copyright 2020 Paul Kocialkowski + */ + +#include "sun8i-v3-sl631.dtsi" + +/ { + model = "SL631 Action Camera with IMX179"; + compatible = "allwinner,sl631-imx179", "allwinner,sl631", + "allwinner,sun8i-v3"; +}; diff --git a/arch/arm/boot/dts/sun8i-v3-sl631.dtsi b/arch/arm/boot/dts/sun8i-v3-sl631.dtsi new file mode 100644 index 000000000000..26648ab909bf --- /dev/null +++ b/arch/arm/boot/dts/sun8i-v3-sl631.dtsi @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR X11) +/* + * Copyright 2020 Paul Kocialkowski + */ + +/dts-v1/; + +#include "sun8i-v3.dtsi" + +#include +#include + +/ { + model = "SL631 Action Camera"; + compatible = "allwinner,sl631", "allwinner,sun8i-v3"; + + aliases { + serial0 = &uart1; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&i2c0 { + status = "okay"; + + axp209: pmic@34 { + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pb_pins>; + status = "okay"; +}; + +&lradc { + vref-supply = <®_ldo2>; + status = "okay"; + + button-174 { + label = "Volume Down"; + linux,code = ; + channel = <0>; + voltage = <174603>; + }; + + button-384 { + label = "Volume Up"; + linux,code = ; + channel = <0>; + voltage = <384126>; + }; + + button-593 { + label = "Home"; + linux,code = ; + channel = <0>; + voltage = <593650>; + }; +}; + +&mmc0 { + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + bus-width = <4>; + vmmc-supply = <®_dcdc3>; + status = "okay"; +}; + +&pio { + vcc-pd-supply = <®_dcdc3>; + vcc-pe-supply = <®_dcdc3>; +}; + +#include "axp209.dtsi" + +&ac_power_supply { + status = "okay"; +}; + +&battery_power_supply { + status = "okay"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; + regulator-name = "vdd-sys-cpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vdd-3v3"; +}; + +®_ldo1 { + regulator-name = "vdd-rtc"; +}; + +®_ldo2 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "avcc"; +}; + +&spi0 { + status = "okay"; + + spi-flash@0 { + reg = <0>; + compatible = "macronix,mx25l6436f", "jedec,spi-nor"; + spi-max-frequency = <50000000>; + }; +}; + +&uart1 { + pinctrl-0 = <&uart1_pg_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + status = "okay"; +}; -- 2.29.1