ARM: dts: sun8i-v3: Add support for the SL631 Action Camera with IMX179
authorPaul Kocialkowski <contact@paulk.fr>
Sun, 6 Dec 2020 16:51:31 +0000 (17:51 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 6 Jan 2021 16:49:58 +0000 (17:49 +0100)
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 <contact@paulk.fr>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20201206165131.1041983-6-contact@paulk.fr
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-v3-sl631.dtsi [new file with mode: 0644]

index 3d1ea0b251680d61688bee1390c08708b33428fa..efe6c6d789f869fbf5dcbee944dce26fc944f3ab 100644 (file)
@@ -1224,6 +1224,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 (file)
index 0000000..117aeec
--- /dev/null
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR X11)
+/*
+ * Copyright 2020 Paul Kocialkowski <contact@paulk.fr>
+ */
+
+#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 (file)
index 0000000..e0d2a31
--- /dev/null
@@ -0,0 +1,138 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR X11)
+/*
+ * Copyright 2020 Paul Kocialkowski <contact@paulk.fr>
+ */
+
+/dts-v1/;
+
+#include "sun8i-v3.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       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 = <&reg_ldo2>;
+       status = "okay";
+
+       button-174 {
+               label = "Down";
+               linux,code = <KEY_DOWN>;
+               channel = <0>;
+               voltage = <174603>;
+       };
+
+       button-384 {
+               label = "Up";
+               linux,code = <KEY_UP>;
+               channel = <0>;
+               voltage = <384126>;
+       };
+
+       button-593 {
+               label = "OK";
+               linux,code = <KEY_OK>;
+               channel = <0>;
+               voltage = <593650>;
+       };
+};
+
+&mmc0 {
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+       bus-width = <4>;
+       vmmc-supply = <&reg_dcdc3>;
+       status = "okay";
+};
+
+&pio {
+       vcc-pd-supply = <&reg_dcdc3>;
+       vcc-pe-supply = <&reg_dcdc3>;
+};
+
+#include "axp209.dtsi"
+
+&ac_power_supply {
+       status = "okay";
+};
+
+&battery_power_supply {
+       status = "okay";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1250000>;
+       regulator-max-microvolt = <1250000>;
+       regulator-name = "vdd-sys-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vdd-3v3";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&spi0 {
+       status = "okay";
+
+       spi-flash@0 {
+               reg = <0>;
+               compatible = "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";
+};