Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/dts Add a PocketCHIP -specific dts with informa...
details: https://anonhg.NetBSD.org/src/rev/419c7b2efd5e
branches: trunk
changeset: 355995:419c7b2efd5e
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Aug 27 02:20:49 2017 +0000
description:
Add a PocketCHIP -specific dts with information about the keyboard and
touch screen.
diffstat:
sys/arch/arm/dts/sun5i-r8-pocketchip.dts | 123 +++++++++++++++++++++++++++++++
1 files changed, 123 insertions(+), 0 deletions(-)
diffs (127 lines):
diff -r 9bb81a423088 -r 419c7b2efd5e sys/arch/arm/dts/sun5i-r8-pocketchip.dts
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/dts/sun5i-r8-pocketchip.dts Sun Aug 27 02:20:49 2017 +0000
@@ -0,0 +1,123 @@
+/* $NetBSD: sun5i-r8-pocketchip.dts,v 1.1 2017/08/27 02:20:49 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "../../../external/gpl2/dts/dist/arch/arm/boot/dts/sun5i-r8-chip.dts"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ model = "NextThing PocketC.H.I.P.";
+ compatible = "nextthing,chip", "allwinner,sun5i-r8", "allwinner,sun5i-a13";
+};
+
+/* Keyboard */
+&i2c1 {
+ status = "okay";
+
+ keyboard: keyboard@34 {
+ compatible = "ti,tca8418";
+ reg = <0x34>;
+ interrupt-parent = <&pio>;
+ interrupts = <6 1 IRQ_TYPE_EDGE_FALLING>;
+
+ keypad,num-rows = <6>;
+ keypad,num-columns = <10>;
+ keypad,autorepeat;
+
+ linux,keymap = <
+ MATRIX_KEY(0, 0, 13)
+ MATRIX_KEY(0, 1, KEY_1)
+ MATRIX_KEY(0, 2, KEY_2)
+ MATRIX_KEY(0, 3, KEY_3)
+ MATRIX_KEY(0, 4, KEY_4)
+ MATRIX_KEY(0, 5, KEY_5)
+ MATRIX_KEY(0, 6, KEY_6)
+ MATRIX_KEY(0, 7, KEY_7)
+ MATRIX_KEY(0, 8, KEY_8)
+ MATRIX_KEY(0, 9, KEY_9)
+
+ MATRIX_KEY(1, 0, KEY_Q)
+ MATRIX_KEY(1, 1, KEY_W)
+ MATRIX_KEY(1, 2, KEY_E)
+ MATRIX_KEY(1, 3, KEY_R)
+ MATRIX_KEY(1, 4, KEY_T)
+ MATRIX_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
+/* Touchscreen */
+&rtp {
+ touchscreen-inverted-x;
+ touchscreen-inverted-y;
+ allwinner,ts-attached;
+};
Home |
Main Index |
Thread Index |
Old Index