arm: sun4i: Add support for Pengpod 1000 tablet
Subsystems (3)
PATCH v2 1/1 arm: sun4i: Add support for Pengpod 1000 tablet
This is initial support for the Pengpod 1000 tablet. The display is not currently working but the UART, SD card and USB all work fine.
---
Changes since v1:
* Added SPDX license identifier
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts | 234 +++++++++++++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts
arch/arm/boot/dts/Makefile +1 -0
@@ -893,6 +893,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \ sun4i-a10-olinuxino-lime.dtb \ sun4i-a10-pcduino.dtb \ sun4i-a10-pcduino2.dtb \ + sun4i-a10-pengpod-1000.dtb \ sun4i-a10-pov-protab2-ips9.dtb dtb-$(CONFIG_MACH_SUN5I) += \ sun5i-a10s-auxtek-t003.dtb \
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +234 -0
234 lines not on this page · raw message
Signature · 1 line
2.11.0
Hi,
Quoted 32 lines · Bob Ham
This is initial support for the Pengpod 1000 tablet. The display is not currently working but the UART, SD card and USB all work fine.
Signed-off-by Bob Ham <[email protected]>---
Changes since v1:* Added SPDX license identifier
arch/arm/boot/dts/Makefile| 1 +arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts | 234 +++++++++++++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 arch/arm/boot/dts/sun4i-a10-pengpod-1000.dtsarch/arm/boot/dts/Makefile +1
-0@@ -893,6 +893,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \ sun4i-a10-olinuxino-lime.dtb \ sun4i-a10-pcduino.dtb \ sun4i-a10-pcduino2.dtb \ + sun4i-a10-pengpod-1000.dtb \ sun4i-a10-pov-protab2-ips9.dtb dtb-$(CONFIG_MACH_SUN5I) += \ sun5i-a10s-auxtek-t003.dtb \arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +0
-0
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts line 5
Quoted 5 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +5
-0@@ -0,0 +1,234 @@ +/* + * Copyright 2015 Hans de Goede <[email protected]> + * Copyright 2017 Robert Ham <[email protected]> + * + * SPDX-License-Identifier: (GPL-2.0-or-later or X11)
This should be the very first line.
Quoted 27 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +27
-0+ * 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 file 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 file 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
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts line 43
Quoted 10 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +10
-0+ * 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.
And this is redundant with the SPDX header.
Quoted 10 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +10
-0+/dts-v1/; +#include "sun4i-a10.dtsi" +#include "sunxi-common-regulators.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/pwm/pwm.h> + +/ { + model = "PengPod 1000";
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts line 65
Quoted 10 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +10
-0+ compatible = "pengpod,1000", "allwinner,sun4i-a10"; + + aliases { + serial0 = &uart0; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&bl_en_pin_pengpod1000>;
These two pinctrl property aren't needed.
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts line 67
Quoted 2 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +2
-0+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
Each step should increase the perceived brightness by roughly 1/Nth, N being the number of steps. Usually PWM backlights don't work like that.
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts line 123
Quoted 10 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +10
-0+&i2c2 { + status = "okay"; + + ft5406ee8: touchscreen at 38 { + compatible = "edt,edt-ft5406"; + reg = <0x38>; + interrupt-parent = <&pio>; + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&touchscreen_pins>;
You can drop these two pinctrl properties as well
Quoted 13 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +13
-0+&pio { + bl_en_pin_pengpod1000: bl_en_pin at 0 { + pins = "PH7"; + function = "gpio_out"; + }; + + touchscreen_pins: touchscreen_pins at 0 { + pins = "PB13"; + function = "gpio_out"; + }; + + usb0_id_detect_pin: usb0_id_detect_pin at 0 { + pins = "PH4";
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts line 161
Quoted 10 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +10
-0+ function = "gpio_in"; + bias-pull-up; + }; + + usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 { + pins = "PH5"; + function = "gpio_in"; + bias-pull-down; + }; +};
And all these nodes.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180604/466cc03c/attachment.sig>
Quoted 11 lines · Maxime Ripard
Quoted 7 lines · Bob Ham
+ * 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.+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.And this is redundant with the SPDX header.
The X11 license notice states explicitly that the notice has to be included in the file. Wouldn't removing it be a violation of the license?
Quoted 4 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts line 67
Quoted 1 line
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +1
-0+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;Each step should increase the perceived brightness by roughly 1/Nth, N being the number of steps. Usually PWM backlights don't work like that.
FYI, this was copied from another .dts file. All of the other brightness-levels settings in sun{4,5,7}i .dts files follow similar patterns:
sun4i-a10-dserve-dsrv9703c.dts: brightness-levels = <0 10
20 30 40 50 60 70 80 90 100>;sun4i-a10-inet1.dts: brightness-levels = <0 10 20 30 40 50 60
70 80 90 100>;sun4i-a10-pov-protab2-ips9.dts: brightness-levels = <0 10
20 30 40 50 60 70 80 90 100>;sun5i-a13-empire-electronix-d709.dts: brightness-levels = <0 10
20 30 40 50 60 70 80 90 100>;sun5i-a13-utoo-p66.dts: brightness-levels = <0 30 40 50 60 70 80
90 100>;sun5i-gr8-evb.dts: brightness-levels = <0 10 20 30 40 50 60
70 80 90 100>;sun7i-a20-wexler-tab7200.dts: brightness-levels = <0 10 20 30 40
50 60 70 80 90 100>;
I'll take the brightness-levels from sun8i-a83t-tbs-a711.dts which follows a more appropriate pattern:
sun8i-a83t-tbs-a711.dts: brightness-levels = <0 1 2 4 8 16
32 64 128 255>;
Thanks,
Bob
Signature · 11 lines
Bob Ham <[email protected]> for (;;) { ++pancakes; } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 2913 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180604/b46aec55/attachment.sig>
Quoted 8 lines · Bob Ham
Quoted 6 lines · Maxime Ripard
Quoted 4 lines · Bob Ham
+ * 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.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.And this is redundant with the SPDX header.
The X11 license notice states explicitly that the notice has to be included in the file. Wouldn't removing it be a violation of the license?
The SPDX header is explicitly here to remove the license text and create a tag that is in a indirect reference to the license text in LICENSES. It's not going away.
Quoted 9 lines
Quoted 4 lines
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts line 67
Quoted 1 line
arch/arm/boot/dts/sun4i-a10-pengpod-1000.dts new file +1
-0+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;Each step should increase the perceived brightness by roughly 1/Nth, N being the number of steps. Usually PWM backlights don't work like that.
FYI, this was copied from another .dts file. All of the other brightness-levels settings in sun{4,5,7}i .dts files follow similar patterns:
Quoted 14 lines
sun4i-a10-dserve-dsrv9703c.dts: brightness-levels = <0 10
20 30 40 50 60 70 80 90 100>;sun4i-a10-inet1.dts: brightness-levels = <0 10 20 30 40 50 60
70 80 90 100>;sun4i-a10-pov-protab2-ips9.dts: brightness-levels = <0 10
20 30 40 50 60 70 80 90 100>;sun5i-a13-empire-electronix-d709.dts: brightness-levels = <0 10
20 30 40 50 60 70 80 90 100>;sun5i-a13-utoo-p66.dts: brightness-levels = <0 30 40 50 60 70 80
90 100>;sun5i-gr8-evb.dts: brightness-levels = <0 10 20 30 40 50 60
70 80 90 100>;sun7i-a20-wexler-tab7200.dts: brightness-levels = <0 10 20 30 40
50 60 70 80 90 100>;
I never said we were perfect reviewers. Feel free to help in the process.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180605/ec5e1ba7/attachment-0001.sig>
Quoted 12 lines · Maxime Ripard
Quoted 11 lines · Bob Ham
Quoted 9 lines · Maxime Ripard
Quoted 7 lines · Bob Ham
+ * 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.+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
And this is redundant with the SPDX header.
The X11 license notice states explicitly that the notice has to be included in the file. Wouldn't removing it be a violation of the license?
The SPDX header is explicitly here to remove the license text and create a tag that is in a indirect reference to the license text in LICENSES. It's not going away.
Well, the top bit that I quoted above says that the licenses refer to only that one file in particular and not the project as a whole. Then the X11 license states that the notice can't be removed from 'this software and associated documentation files (the "Software")' which would seem to refer to the single file. Therefore, removing the notice from the single file and replacing it with an SPDX header would seem to violate the license.
It's a fine point but it makes me nervous. I originally based my .dts on sun4i-a10-inet1.dts. I've CC'd the original copyright holder, Hans de Goede. Hans, are you willing to give permission for the license notice to be replaced with just an SPDX header indicating the dual licensing?
While we're at it, there are a number of other files with the same license text. Hans, are you prepared to give permission for your other license notices to be replaced with SPDX headers?
Thanks,
Bob
Signature · 11 lines
Bob Ham <[email protected]> for (;;) { ++pancakes; } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 2913 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180605/c91f541e/attachment.sig>
Hi,
Quoted 30 lines · Bob Ham
Quoted 12 lines · Maxime Ripard
Quoted 11 lines · Bob Ham
Quoted 9 lines · Maxime Ripard
Quoted 7 lines · Bob Ham
+ * 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.+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.Quoted 8 lines
Quoted 4 lines
Quoted 1 line
And this is redundant with the SPDX header.
The X11 license notice states explicitly that the notice has to be included in the file. Wouldn't removing it be a violation of the license?
The SPDX header is explicitly here to remove the license text and create a tag that is in a indirect reference to the license text in LICENSES. It's not going away.
Well, the top bit that I quoted above says that the licenses refer to only that one file in particular and not the project as a whole. Then the X11 license states that the notice can't be removed from 'this software and associated documentation files (the "Software")' which would seem to refer to the single file. Therefore, removing the notice from the single file and replacing it with an SPDX header would seem to violate the license.
Quoted 5 lines
It's a fine point but it makes me nervous. I originally based my .dts on
sun4i-a10-inet1.dts. I've CC'd the original copyright holder, Hans de Goede. Hans, are you willing to give permission for the license notice to be replaced with just an SPDX header indicating the dual licensing?
Yes that is fine by me and you've my permission to switch to using just the SPDX header.
FWIW I do not believe the "can't be removed from 'this software and associated documentation files (the "Software")'" language applies to the software as a whole and not individual files.
Quoted 3 lines
While we're at it, there are a number of other files with the same license text. Hans, are you prepared to give permission for your other license notices to be replaced with SPDX headers?
Yes you may make the same change to all files with my copyright.
Regards,
Hans
Quoted 10 lines · Hans de Goede
Quoted 5 lines · Bob Ham
It's a fine point but it makes me nervous.? I originally based my .dts on
sun4i-a10-inet1.dts.? I've CC'd the original copyright holder, Hans de Goede.? Hans, are you willing to give permission for the license notice to be replaced with just an SPDX header indicating the dual licensing?Yes that is fine by me and you've my permission to switch to using just the SPDX header.
Excellent, thanks! :-)
Signature · 11 lines
Bob Ham <[email protected]> for (;;) { ++pancakes; } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 2913 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180613/b4d4d5c8/attachment.sig>