linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets
@ 2016-07-08 16:05 Hans de Goede
  2016-07-08 16:05 ` [PATCH 01/15] ARM: dts: sunxi: Rename sunxi-q8-common.dtsi sunxi-reference-design-tablet.dtsi Hans de Goede
                   ` (15 more replies)
  0 siblings, 16 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Maxime, Chen-Yu,

Here is a series based on Chen-Yu's suggestion to add a
reference-design-tablet.dtsi file. This works out quite
nicely, resulting in much simpler tablet .dts files, as
well as enabling a bunch of extra features on some tablets,
showing that having to add the same dts bits over and over
again for all model tablets is not a good idea.

This also includes a v2 submission of the new tablet dts
files which sparked the reference-design-tablet.dtsi
discussion.

Regards,

Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 01/15] ARM: dts: sunxi: Rename sunxi-q8-common.dtsi sunxi-reference-design-tablet.dtsi
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 02/15] ARM: dts: sun5i: Move q8 display bits to sun5i-a13-q8-tablet.dts Hans de Goede
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

Rename sunxi-q8-common.dtsi to sunxi-reference-design-tablet.dtsi. This
is part of renaming all the sun?i-q8-common.dtsi files to
sun?i-reference-design-tablet.dtsi since most of the hw-config in there
is shared by all sunxi tablets.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-q8-common.dtsi                                  | 2 +-
 arch/arm/boot/dts/sun8i-q8-common.dtsi                                  | 2 +-
 .../dts/{sunxi-q8-common.dtsi => sunxi-reference-design-tablet.dtsi}    | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/boot/dts/{sunxi-q8-common.dtsi => sunxi-reference-design-tablet.dtsi} (100%)

diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
index a5de28d..8977fb2 100644
--- a/arch/arm/boot/dts/sun5i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
@@ -39,7 +39,7 @@
  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
-#include "sunxi-q8-common.dtsi"
+#include "sunxi-reference-design-tablet.dtsi"
 
 #include <dt-bindings/pwm/pwm.h>
 
diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-q8-common.dtsi
index f3f4ce0..0b85ea4 100644
--- a/arch/arm/boot/dts/sun8i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun8i-q8-common.dtsi
@@ -39,7 +39,7 @@
  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
-#include "sunxi-q8-common.dtsi"
+#include "sunxi-reference-design-tablet.dtsi"
 
 #include <dt-bindings/pwm/pwm.h>
 
diff --git a/arch/arm/boot/dts/sunxi-q8-common.dtsi b/arch/arm/boot/dts/sunxi-reference-design-tablet.dtsi
similarity index 100%
rename from arch/arm/boot/dts/sunxi-q8-common.dtsi
rename to arch/arm/boot/dts/sunxi-reference-design-tablet.dtsi
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 02/15] ARM: dts: sun5i: Move q8 display bits to sun5i-a13-q8-tablet.dts
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
  2016-07-08 16:05 ` [PATCH 01/15] ARM: dts: sunxi: Rename sunxi-q8-common.dtsi sunxi-reference-design-tablet.dtsi Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 03/15] ARM: dts: sun5i: Rename sun5i-q8-common.dtsi sun5i-reference-design-tablet.dtsi Hans de Goede
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

This is a preparation patch for renaming sun5i-q8-common.dtsi to
sun5i-reference-design-tablet.dtsi and sharing it between all
the A13 tablet dts files.

Since we only have a panel config for the 18 tablets (for now) move
this to the q8 specific dts file.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-a13-q8-tablet.dts | 36 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/sun5i-q8-common.dtsi    | 36 -------------------------------
 2 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts b/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
index dce7782..afe14f7 100644
--- a/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
+++ b/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
@@ -47,4 +47,40 @@
 / {
 	model = "Q8 A13 Tablet";
 	compatible = "allwinner,q8-a13", "allwinner,sun5i-a13";
+
+	panel: panel {
+		compatible = "urt,umsh-8596md-t", "simple-panel";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port at 0 {
+			reg = <0>;
+			/* TODO: lcd panel uses axp gpio0 as enable pin */
+			backlight = <&backlight>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			panel_input: endpoint at 0 {
+				reg = <0>;
+				remote-endpoint = <&tcon0_out_lcd>;
+			};
+		};
+	};
+};
+
+&be0 {
+	status = "okay";
+};
+
+&tcon0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&lcd_rgb666_pins>;
+	status = "okay";
+};
+
+&tcon0_out {
+	tcon0_out_lcd: endpoint at 0 {
+		reg = <0>;
+		remote-endpoint = <&panel_input>;
+	};
 };
diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
index 8977fb2..ca5d0c4 100644
--- a/arch/arm/boot/dts/sun5i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
@@ -59,29 +59,6 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
-
-	panel: panel {
-		compatible = "urt,umsh-8596md-t", "simple-panel";
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port at 0 {
-			reg = <0>;
-			/* TODO: lcd panel uses axp gpio0 as enable pin */
-			backlight = <&backlight>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
-				remote-endpoint = <&tcon0_out_lcd>;
-			};
-		};
-	};
-};
-
-&be0 {
-	status = "okay";
 };
 
 &codec {
@@ -202,19 +179,6 @@
 	status = "okay";
 };
 
-&tcon0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&lcd_rgb666_pins>;
-	status = "okay";
-};
-
-&tcon0_out {
-	tcon0_out_lcd: endpoint at 0 {
-		reg = <0>;
-		remote-endpoint = <&panel_input>;
-	};
-};
-
 &uart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart1_pins_b>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 03/15] ARM: dts: sun5i: Rename sun5i-q8-common.dtsi sun5i-reference-design-tablet.dtsi
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
  2016-07-08 16:05 ` [PATCH 01/15] ARM: dts: sunxi: Rename sunxi-q8-common.dtsi sunxi-reference-design-tablet.dtsi Hans de Goede
  2016-07-08 16:05 ` [PATCH 02/15] ARM: dts: sun5i: Move q8 display bits to sun5i-a13-q8-tablet.dts Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 04/15] ARM: dts: sun5i: reference-design-tablet: Set lradc vref to avcc Hans de Goede
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

Rename sun5i-q8-common.dtsi to sun5i-reference-design-tablet.dtsi. This
is part of renaming all the sun?i-q8-common.dtsi files to
sun?i-reference-design-tablet.dtsi since most of the hw-config in there
is shared by all sunxi tablets.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-a13-q8-tablet.dts                               | 2 +-
 .../dts/{sun5i-q8-common.dtsi => sun5i-reference-design-tablet.dtsi}    | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename arch/arm/boot/dts/{sun5i-q8-common.dtsi => sun5i-reference-design-tablet.dtsi} (100%)

diff --git a/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts b/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
index afe14f7..a89f29fa 100644
--- a/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
+++ b/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
@@ -42,7 +42,7 @@
 
 /dts-v1/;
 #include "sun5i-a13.dtsi"
-#include "sun5i-q8-common.dtsi"
+#include "sun5i-reference-design-tablet.dtsi"
 
 / {
 	model = "Q8 A13 Tablet";
diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
similarity index 100%
rename from arch/arm/boot/dts/sun5i-q8-common.dtsi
rename to arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 04/15] ARM: dts: sun5i: reference-design-tablet: Set lradc vref to avcc
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (2 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 03/15] ARM: dts: sun5i: Rename sun5i-q8-common.dtsi sun5i-reference-design-tablet.dtsi Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 05/15] ARM: dts: sun5i: reference-design-tablet: Remove mention of q8 Hans de Goede
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

Set lradc vref to the actual avcc ldo, rather then to the fixed 3v0
regulator from common-regulators.dtsi.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
index ca5d0c4..e78452c 100644
--- a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
+++ b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
@@ -92,6 +92,10 @@
 
 #include "axp209.dtsi"
 
+&lradc {
+	vref-supply = <&reg_ldo2>;
+};
+
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 05/15] ARM: dts: sun5i: reference-design-tablet: Remove mention of q8
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (3 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 04/15] ARM: dts: sun5i: reference-design-tablet: Set lradc vref to avcc Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-09  3:53   ` Chen-Yu Tsai
  2016-07-08 16:05 ` [PATCH 06/15] ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for dit4350 dts Hans de Goede
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

Remove all mention of q8 from sun5i-reference-design-tablet.dtsi.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
index e78452c..20cc940 100644
--- a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
+++ b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
@@ -98,7 +98,7 @@
 
 &mmc0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
 	vmmc-supply = <&reg_vcc3v0>;
 	bus-width = <4>;
 	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
@@ -118,7 +118,7 @@
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
 
-	mmc0_cd_pin_q8: mmc0_cd_pin at 0 {
+	mmc0_cd_pin: mmc0_cd_pin at 0 {
 		allwinner,pins = "PG0";
 		allwinner,function = "gpio_in";
 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 06/15] ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for dit4350 dts
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (4 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 05/15] ARM: dts: sun5i: reference-design-tablet: Remove mention of q8 Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 07/15] ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for utoo p66 dts Hans de Goede
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

This results in quite a nice cleanup for this dts file.

Note as a side-effect this also enables the on board speaker / headphones
out. I've tested that this works as advertised.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-a13-difrnce-dit4350.dts | 178 +-----------------------
 1 file changed, 1 insertion(+), 177 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-a13-difrnce-dit4350.dts b/arch/arm/boot/dts/sun5i-a13-difrnce-dit4350.dts
index 6546fa0..894c4c4 100644
--- a/arch/arm/boot/dts/sun5i-a13-difrnce-dit4350.dts
+++ b/arch/arm/boot/dts/sun5i-a13-difrnce-dit4350.dts
@@ -42,185 +42,9 @@
 
 /dts-v1/;
 #include "sun5i-a13.dtsi"
-#include "sunxi-common-regulators.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
-#include <dt-bindings/pwm/pwm.h>
+#include "sun5i-reference-design-tablet.dtsi"
 
 / {
 	model = "Difrnce DIT4350";
 	compatible = "difrnce,dit4350", "allwinner,sun5i-a13";
-
-	aliases {
-		serial0 = &uart1;
-	};
-
-	backlight: backlight {
-		compatible = "pwm-backlight";
-		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-		default-brightness-level = <8>;
-		/* TODO: backlight uses axp gpio1 as enable pin */
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-};
-
-&cpu0 {
-	cpu-supply = <&reg_dcdc2>;
-};
-
-&ehci0 {
-	status = "okay";
-};
-
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
-	status = "okay";
-
-	axp209: pmic at 34 {
-		reg = <0x34>;
-		interrupts = <0>;
-	};
-};
-
-#include "axp209.dtsi"
-
-&i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
-	status = "okay";
-
-	pcf8563: rtc at 51 {
-		compatible = "nxp,pcf8563";
-		reg = <0x51>;
-	};
-};
-
-&lradc {
-	vref-supply = <&reg_ldo2>;
-	status = "okay";
-
-	button at 200 {
-		label = "Volume Up";
-		linux,code = <KEY_VOLUMEUP>;
-		channel = <0>;
-		voltage = <200000>;
-	};
-
-	button at 400 {
-		label = "Volume Down";
-		linux,code = <KEY_VOLUMEDOWN>;
-		channel = <0>;
-		voltage = <400000>;
-	};
-};
-
-&mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
-	vmmc-supply = <&reg_vcc3v3>;
-	bus-width = <4>;
-	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
-	cd-inverted;
-	status = "okay";
-};
-
-&otg_sram {
-	status = "okay";
-};
-
-&pio {
-	mmc0_cd_pin_d709: mmc0_cd_pin at 0 {
-		allwinner,pins = "PG0";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-
-	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
-		allwinner,pins = "PG1";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-		allwinner,pins = "PG2";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-};
-
-&pwm {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pwm0_pins>;
-	status = "okay";
-};
-
-&reg_dcdc2 {
-	regulator-always-on;
-	regulator-min-microvolt = <1000000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc3 {
-	regulator-always-on;
-	regulator-min-microvolt = <1250000>;
-	regulator-max-microvolt = <1250000>;
-	regulator-name = "vdd-int-pll";
-};
-
-&reg_ldo1 {
-	regulator-name = "vdd-rtc";
-};
-
-&reg_ldo2 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "avcc";
-};
-
-&reg_ldo3 {
-	regulator-min-microvolt = <3300000>;
-	regulator-max-microvolt = <3300000>;
-	regulator-name = "vcc-wifi";
-};
-
-&reg_usb0_vbus {
-	gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
-	status = "okay";
-};
-
-&uart1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart1_pins_b>;
-	status = "okay";
-};
-
-&usb_otg {
-	dr_mode = "otg";
-	status = "okay";
-};
-
-&usb0_vbus_pin_a {
-	allwinner,pins = "PG12";
-};
-
-&usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-	usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
-	usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
-	usb0_vbus-supply = <&reg_usb0_vbus>;
-	usb1_vbus-supply = <&reg_ldo3>;
-	status = "okay";
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 07/15] ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for utoo p66 dts
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (5 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 06/15] ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for dit4350 dts Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 08/15] ARM: dts: Copy sun8i-q8-common.dtsi sun8i-reference-design-tablet.dtsi Hans de Goede
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

This results in a nice cleanup for this dts file.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-a13-utoo-p66.dts | 180 ++++---------------------------
 1 file changed, 21 insertions(+), 159 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts b/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
index fa9ddfd..a8b0bcc 100644
--- a/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
+++ b/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
@@ -42,24 +42,20 @@
 
 /dts-v1/;
 #include "sun5i-a13.dtsi"
-#include "sunxi-common-regulators.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "sun5i-reference-design-tablet.dtsi"
 #include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
-#include <dt-bindings/pwm/pwm.h>
 
 / {
 	model = "Utoo P66";
 	compatible = "utoo,p66", "allwinner,sun5i-a13";
 
-	backlight: backlight {
-		compatible = "pwm-backlight";
-		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-		/* Note levels of 10 / 20% result in backlight off */
-		brightness-levels = <0 30 40 50 60 70 80 90 100>;
-		default-brightness-level = <6>;
-		/* TODO: backlight uses axp gpio1 as enable pin */
+	/* The P66 uses the uart pins as gpios */
+	aliases {
+		/delete-property/serial0;
+	};
+
+	chosen {
+		/delete-property/stdout-path;
 	};
 
 	i2c_lcd: i2c at 0 {
@@ -73,39 +69,21 @@
 	};
 };
 
-&codec {
-	pinctrl-names = "default";
-	pinctrl-0 = <&codec_pa_pin>;
-	allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
-	status = "okay";
-};
-
-&cpu0 {
-	cpu-supply = <&reg_dcdc2>;
+&backlight {
+	/* Note levels of 10 / 20% result in backlight off */
+	brightness-levels = <0 30 40 50 60 70 80 90 100>;
+	default-brightness-level = <6>;
 };
 
-&ehci0 {
-	status = "okay";
+&codec {
+	allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
 };
 
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
-	status = "okay";
-
-	axp209: pmic at 34 {
-		reg = <0x34>;
-		interrupts = <0>;
-	};
+&codec_pa_pin {
+	allwinner,pins = "PG3";
 };
 
-#include "axp209.dtsi"
-
 &i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
-	status = "okay";
-
 	icn8318: touchscreen at 40 {
 		compatible = "chipone,icn8318";
 		reg = <0x40>;
@@ -119,40 +97,6 @@
 		touchscreen-inverted-x;
 		touchscreen-swapped-x-y;
 	};
-
-	pcf8563: rtc at 51 {
-		compatible = "nxp,pcf8563";
-		reg = <0x51>;
-	};
-};
-
-&lradc {
-	vref-supply = <&reg_ldo2>;
-	status = "okay";
-
-	button at 200 {
-		label = "Volume Up";
-		linux,code = <KEY_VOLUMEUP>;
-		channel = <0>;
-		voltage = <200000>;
-	};
-
-	button at 400 {
-		label = "Volume Down";
-		linux,code = <KEY_VOLUMEDOWN>;
-		channel = <0>;
-		voltage = <400000>;
-	};
-};
-
-&mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_p66>;
-	vmmc-supply = <&reg_vcc3v3>;
-	bus-width = <4>;
-	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
-	cd-inverted;
-	status = "okay";
 };
 
 &mmc2 {
@@ -170,39 +114,7 @@
 	};
 };
 
-&otg_sram {
-	status = "okay";
-};
-
 &pio {
-	codec_pa_pin: codec_pa_pin at 0 {
-		allwinner,pins = "PG3";
-		allwinner,function = "gpio_out";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-	};
-
-	mmc0_cd_pin_p66: mmc0_cd_pin at 0 {
-		allwinner,pins = "PG0";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-
-	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
-		allwinner,pins = "PG1";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-		allwinner,pins = "PG2";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-
 	i2c_lcd_pins: i2c_lcd_pin at 0 {
 		allwinner,pins = "PG10", "PG12";
 		allwinner,function = "gpio_out";
@@ -217,67 +129,17 @@
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
 
-	usb0_vbus_pin_a: usb0_vbus_pin at 0 {
-		allwinner,pins = "PB4";
-		allwinner,function = "gpio_out";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-	};
-};
-
-&pwm {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pwm0_pins>;
-	status = "okay";
-};
-
-&reg_dcdc2 {
-	regulator-always-on;
-	regulator-min-microvolt = <1000000>;
-	regulator-max-microvolt = <1500000>;
-	regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc3 {
-	regulator-always-on;
-	regulator-min-microvolt = <1000000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-int-pll";
-};
-
-&reg_ldo1 {
-	regulator-name = "vdd-rtc";
-};
-
-&reg_ldo2 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "avcc";
-};
-
-&reg_ldo3 {
-	regulator-min-microvolt = <3300000>;
-	regulator-max-microvolt = <3300000>;
-	regulator-name = "vcc-wifi";
 };
 
 &reg_usb0_vbus {
 	gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
-	status = "okay";
 };
 
-&usb_otg {
-	dr_mode = "otg";
-	status = "okay";
+&uart1 {
+	/* The P66 uses the uart pins as gpios */
+	status = "disabled";
 };
 
-&usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-	usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
-	usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
-	usb0_vbus-supply = <&reg_usb0_vbus>;
-	usb1_vbus-supply = <&reg_ldo3>;
-	status = "okay";
+&usb0_vbus_pin_a {
+	allwinner,pins = "PB4";
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 08/15] ARM: dts: Copy sun8i-q8-common.dtsi sun8i-reference-design-tablet.dtsi
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (6 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 07/15] ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for utoo p66 dts Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 09/15] ARM: dts: sun8i: reference-design-tablet: Add drivevbus-supply Hans de Goede
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

Copy sun8i-q8-common.dtsi to sun8i-reference-design-tablet.dtsi. This
is part of renaming all the sun?i-q8-common.dtsi files to
sun?i-reference-design-tablet.dtsi since most of the hw-config in there
is shared by all sunxi tablets.

Note that in this case we keep sun5i-q8-common.dtsi as it is shared
between a23 / a33 q8 tablets. Also we leave the usb-wifi config in
there (rather then in sun8i-reference-design-tablet.dtsi) as most
sun8i tablets use sdio wifi rather then usb wifi.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-q8-common.dtsi             | 171 +--------------------
 ...mon.dtsi => sun8i-reference-design-tablet.dtsi} |  13 +-
 2 files changed, 5 insertions(+), 179 deletions(-)
 copy arch/arm/boot/dts/{sun8i-q8-common.dtsi => sun8i-reference-design-tablet.dtsi} (96%)

diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-q8-common.dtsi
index 0b85ea4..60fa958 100644
--- a/arch/arm/boot/dts/sun8i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun8i-q8-common.dtsi
@@ -40,181 +40,12 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "sunxi-reference-design-tablet.dtsi"
-
-#include <dt-bindings/pwm/pwm.h>
-
-/ {
-	aliases {
-		serial0 = &r_uart;
-	};
-
-	backlight: backlight {
-		compatible = "pwm-backlight";
-		pinctrl-names = "default";
-		pinctrl-0 = <&bl_en_pin_q8>;
-		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-		default-brightness-level = <8>;
-		enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-};
+#include "sun8i-reference-design-tablet.dtsi"
 
 &ehci0 {
 	status  = "okay";
 };
 
-&mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
-	vmmc-supply = <&reg_dcdc1>;
-	bus-width = <4>;
-	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
-	cd-inverted;
-	status = "okay";
-};
-
-&pio {
-	bl_en_pin_q8: bl_en_pin at 0 {
-		allwinner,pins = "PH6";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-	};
-
-	mmc0_cd_pin_q8: mmc0_cd_pin at 0 {
-		allwinner,pins = "PB4";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-		allwinner,pins = "PH8";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-};
-
-&r_rsb {
-	status = "okay";
-
-	axp22x: pmic at 3a3 {
-		compatible = "x-powers,axp223";
-		reg = <0x3a3>;
-		interrupt-parent = <&nmi_intc>;
-		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-		eldoin-supply = <&reg_dcdc1>;
-		x-powers,drive-vbus-en;
-	};
-};
-
-#include "axp22x.dtsi"
-
-&reg_aldo1 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "vcc-io";
-};
-
-&reg_aldo2 {
-	regulator-always-on;
-	regulator-min-microvolt = <2350000>;
-	regulator-max-microvolt = <2650000>;
-	regulator-name = "vdd-dll";
-};
-
-&reg_aldo3 {
-	regulator-always-on;
-	regulator-min-microvolt = <2700000>;
-	regulator-max-microvolt = <3300000>;
-	regulator-name = "vcc-pll-avcc";
-};
-
-&reg_dc1sw {
-	regulator-name = "vcc-lcd";
-};
-
-&reg_dc5ldo {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-cpus";
-};
-
-&reg_dcdc1 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "vcc-3v0";
-};
-
-&reg_dcdc2 {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-sys";
-};
-
-&reg_dcdc3 {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc5 {
-	regulator-always-on;
-	regulator-min-microvolt = <1500000>;
-	regulator-max-microvolt = <1500000>;
-	regulator-name = "vcc-dram";
-};
-
-&reg_dldo1 {
-	regulator-min-microvolt = <3300000>;
-	regulator-max-microvolt = <3300000>;
-	regulator-name = "vcc-wifi";
-};
-
-&reg_drivevbus {
-	regulator-name = "usb0-vbus";
-	status = "okay";
-};
-
-&reg_rtc_ldo {
-	regulator-name = "vcc-rtc";
-};
-
-&r_uart {
-	pinctrl-names = "default";
-	pinctrl-0 = <&r_uart_pins_a>;
-	status = "okay";
-};
-
-&simplefb_lcd {
-	vcc-lcd-supply = <&reg_dc1sw>;
-};
-
-&usb_otg {
-	dr_mode = "otg";
-	status = "okay";
-};
-
-&usb_power_supply {
-	status = "okay";
-};
-
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
-	usb0_vbus_power-supply = <&usb_power_supply>;
-	usb0_vbus-supply = <&reg_drivevbus>;
 	usb1_vbus-supply = <&reg_dldo1>;
-	status = "okay";
 };
diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
similarity index 96%
copy from arch/arm/boot/dts/sun8i-q8-common.dtsi
copy to arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
index 0b85ea4..b8546ef 100644
--- a/arch/arm/boot/dts/sun8i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
@@ -51,7 +51,7 @@
 	backlight: backlight {
 		compatible = "pwm-backlight";
 		pinctrl-names = "default";
-		pinctrl-0 = <&bl_en_pin_q8>;
+		pinctrl-0 = <&bl_en_pin>;
 		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
 		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
 		default-brightness-level = <8>;
@@ -63,13 +63,9 @@
 	};
 };
 
-&ehci0 {
-	status  = "okay";
-};
-
 &mmc0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
 	vmmc-supply = <&reg_dcdc1>;
 	bus-width = <4>;
 	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
@@ -78,14 +74,14 @@
 };
 
 &pio {
-	bl_en_pin_q8: bl_en_pin at 0 {
+	bl_en_pin: bl_en_pin at 0 {
 		allwinner,pins = "PH6";
 		allwinner,function = "gpio_in";
 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
 
-	mmc0_cd_pin_q8: mmc0_cd_pin at 0 {
+	mmc0_cd_pin: mmc0_cd_pin at 0 {
 		allwinner,pins = "PB4";
 		allwinner,function = "gpio_in";
 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
@@ -215,6 +211,5 @@
 	usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
 	usb0_vbus_power-supply = <&usb_power_supply>;
 	usb0_vbus-supply = <&reg_drivevbus>;
-	usb1_vbus-supply = <&reg_dldo1>;
 	status = "okay";
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 09/15] ARM: dts: sun8i: reference-design-tablet: Add drivevbus-supply
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (7 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 08/15] ARM: dts: Copy sun8i-q8-common.dtsi sun8i-reference-design-tablet.dtsi Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 10/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for polaroid mid2809pxe04 Hans de Goede
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

Add a drivevbus-supply property so that the drivevbus regulator
reports the right voltage value.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
index b8546ef..9d90361 100644
--- a/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
+++ b/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
@@ -105,6 +105,7 @@
 		interrupt-parent = <&nmi_intc>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
 		eldoin-supply = <&reg_dcdc1>;
+		drivevbus-supply = <&reg_vcc5v0>;
 		x-powers,drive-vbus-en;
 	};
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 10/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for polaroid mid2809pxe04
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (8 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 09/15] ARM: dts: sun8i: reference-design-tablet: Add drivevbus-supply Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 11/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for gt90h dts Hans de Goede
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

This results in quite a nice cleanup for this dts file.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 .../boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts   | 207 +--------------------
 1 file changed, 1 insertion(+), 206 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts b/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
index e8c3f21..6d06e24 100644
--- a/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
+++ b/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
@@ -42,214 +42,9 @@
 
 /dts-v1/;
 #include "sun8i-a23.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
-#include <dt-bindings/pwm/pwm.h>
+#include "sun8i-reference-design-tablet.dtsi"
 
 / {
 	model = "Polaroid MID2809PXE04 tablet";
 	compatible = "polaroid,mid2809pxe04", "allwinner,sun8i-a23";
-
-	aliases {
-		serial0 = &r_uart;
-	};
-
-	backlight: backlight {
-		compatible = "pwm-backlight";
-		pinctrl-names = "default";
-		pinctrl-0 = <&bl_en_pin_mid2809>;
-		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-		default-brightness-level = <8>;
-		enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-};
-
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
-	status = "okay";
-};
-
-&i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
-	status = "okay";
-};
-
-&lradc {
-	vref-supply = <&reg_vcc3v0>;
-	status = "okay";
-
-	button at 200 {
-		label = "Volume Up";
-		linux,code = <KEY_VOLUMEUP>;
-		channel = <0>;
-		voltage = <200000>;
-	};
-
-	button at 400 {
-		label = "Volume Down";
-		linux,code = <KEY_VOLUMEDOWN>;
-		channel = <0>;
-		voltage = <400000>;
-	};
-};
-
-&mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_mid2809>;
-	vmmc-supply = <&reg_dcdc1>;
-	bus-width = <4>;
-	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
-	cd-inverted;
-	status = "okay";
-};
-
-&pio {
-	bl_en_pin_mid2809: bl_en_pin at 0 {
-		allwinner,pins = "PH6";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-	};
-
-	mmc0_cd_pin_mid2809: mmc0_cd_pin at 0 {
-		allwinner,pins = "PB4";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-		allwinner,pins = "PH8";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-};
-
-&pwm {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pwm0_pins>;
-	status = "okay";
-};
-
-&r_rsb {
-	status = "okay";
-
-	axp22x: pmic at 3a3 {
-		compatible = "x-powers,axp223";
-		reg = <0x3a3>;
-		interrupt-parent = <&nmi_intc>;
-		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-		eldoin-supply = <&reg_dcdc1>;
-		x-powers,drive-vbus-en;
-	};
-};
-
-&r_uart {
-	pinctrl-names = "default";
-	pinctrl-0 = <&r_uart_pins_a>;
-	status = "okay";
-};
-
-#include "axp22x.dtsi"
-
-&reg_aldo1 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "vcc-io";
-};
-
-&reg_aldo2 {
-	regulator-always-on;
-	regulator-min-microvolt = <2350000>;
-	regulator-max-microvolt = <2650000>;
-	regulator-name = "vdd-dll";
-};
-
-&reg_aldo3 {
-	regulator-always-on;
-	regulator-min-microvolt = <2700000>;
-	regulator-max-microvolt = <3300000>;
-	regulator-name = "vcc-pll-avcc";
-};
-
-&reg_dc1sw {
-	regulator-name = "vcc-lcd";
-};
-
-&reg_dc5ldo {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-cpus";
-};
-
-&reg_dcdc1 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "vcc-3v0";
-};
-
-&reg_dcdc2 {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-sys";
-};
-
-&reg_dcdc3 {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc5 {
-	regulator-always-on;
-	regulator-min-microvolt = <1500000>;
-	regulator-max-microvolt = <1500000>;
-	regulator-name = "vcc-dram";
-};
-
-&reg_drivevbus {
-	regulator-name = "usb0-vbus";
-	status = "okay";
-};
-
-&reg_rtc_ldo {
-	regulator-name = "vcc-rtc";
-};
-
-&simplefb_lcd {
-	vcc-lcd-supply = <&reg_dc1sw>;
-};
-
-&usb_otg {
-	dr_mode = "otg";
-	status = "okay";
-};
-
-&usb_power_supply {
-	status = "okay";
-};
-
-&usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
-	usb0_vbus_power-supply = <&usb_power_supply>;
-	usb0_vbus-supply = <&reg_drivevbus>;
-	status = "okay";
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 11/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for gt90h dts
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (9 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 10/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for polaroid mid2809pxe04 Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 12/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for ga10h dts Hans de Goede
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

This results in quite a nice cleanup for this dts file.

As an added bonus this also enables full otg support. I've tested that
this works as advertised.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 215 +------------------------------
 1 file changed, 1 insertion(+), 214 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts b/arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts
index d05406c..f27ebbb 100644
--- a/arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts
+++ b/arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts
@@ -42,86 +42,18 @@
 
 /dts-v1/;
 #include "sun8i-a23.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
-#include <dt-bindings/pwm/pwm.h>
+#include "sun8i-reference-design-tablet.dtsi"
 
 / {
 	model = "Allwinner GT90H Dual Core Tablet (v4)";
 	compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
-
-	aliases {
-		serial0 = &r_uart;
-	};
-
-	backlight: backlight {
-		compatible = "pwm-backlight";
-		pinctrl-names = "default";
-		pinctrl-0 = <&bl_en_pin_gt90h>;
-		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-		default-brightness-level = <8>;
-		enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
 };
 
 &ehci0 {
 	status = "okay";
 };
 
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
-	status = "okay";
-	/*
-	 * The gsl1680 is rated at 400KHz and it will not work reliable at
-	 * 100KHz, this has been confirmed on multiple different tablets.
-	 * The gsl1680 is the only device on this bus.
-	 */
-	clock-frequency = <400000>;
-
-	gsl1680: touchscreen at 40 {
-		compatible = "silead,gsl1680";
-		reg = <0x40>;
-		interrupt-parent = <&pio>;
-		interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
-		pinctrl-names = "default";
-		pinctrl-0 = <&ts_power_pin_gth90h>;
-		power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
-	};
-};
-
-&i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
-	status = "okay";
-};
-
 &lradc {
-	vref-supply = <&reg_vcc3v0>;
-	status = "okay";
-
-	button at 200 {
-		label = "Volume Up";
-		linux,code = <KEY_VOLUMEUP>;
-		channel = <0>;
-		voltage = <200000>;
-	};
-
-	button at 400 {
-		label = "Volume Down";
-		linux,code = <KEY_VOLUMEDOWN>;
-		channel = <0>;
-		voltage = <400000>;
-	};
-
 	button at 600 {
 		label = "Back";
 		linux,code = <KEY_BACK>;
@@ -130,151 +62,6 @@
 	};
 };
 
-&mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
-	vmmc-supply = <&reg_aldo1>;
-	bus-width = <4>;
-	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
-	cd-inverted;
-	status = "okay";
-};
-
-&pio {
-	bl_en_pin_gt90h: bl_en_pin at 0 {
-		allwinner,pins = "PH6";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-	};
-
-	mmc0_cd_pin_gt90h: mmc0_cd_pin at 0 {
-		allwinner,pins = "PB4";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-
-	ts_power_pin_gth90h: ts_power_pin at 0 {
-		allwinner,pins = "PH1";
-		allwinner,function = "gpio_out";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-	};
-};
-
-&pwm {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pwm0_pins>;
-	status = "okay";
-};
-
-&r_rsb {
-	status = "okay";
-
-	axp22x: pmic at 3a3 {
-		compatible = "x-powers,axp223";
-		reg = <0x3a3>;
-		interrupt-parent = <&nmi_intc>;
-		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-		eldoin-supply = <&reg_dcdc1>;
-	};
-};
-
-&r_uart {
-	pinctrl-names = "default";
-	pinctrl-0 = <&r_uart_pins_a>;
-	status = "okay";
-};
-
-#include "axp22x.dtsi"
-
-&reg_aldo1 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "vcc-io";
-};
-
-&reg_aldo2 {
-	regulator-always-on;
-	regulator-min-microvolt = <2350000>;
-	regulator-max-microvolt = <2650000>;
-	regulator-name = "vdd-dll";
-};
-
-&reg_aldo3 {
-	regulator-always-on;
-	regulator-min-microvolt = <2700000>;
-	regulator-max-microvolt = <3300000>;
-	regulator-name = "vcc-pll-avcc";
-};
-
-&reg_dc1sw {
-	regulator-name = "vcc-lcd";
-};
-
-&reg_dc5ldo {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-cpus";
-};
-
-&reg_dcdc1 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "vcc-3v0";
-};
-
-&reg_dcdc2 {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-sys";
-};
-
-&reg_dcdc3 {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc5 {
-	regulator-always-on;
-	regulator-min-microvolt = <1500000>;
-	regulator-max-microvolt = <1500000>;
-	regulator-name = "vcc-dram";
-};
-
-&reg_dldo1 {
-	regulator-min-microvolt = <3300000>;
-	regulator-max-microvolt = <3300000>;
-	regulator-name = "vcc-wifi";
-};
-
-&reg_rtc_ldo {
-	regulator-name = "vcc-rtc";
-};
-
-&simplefb_lcd {
-	vcc-lcd-supply = <&reg_dc1sw>;
-};
-
-/*
- * FIXME for now we only support host mode and rely on u-boot to have
- * turned on Vbus which is controlled by the axp223 pmic on the board.
- *
- * Once we have axp223 support we should switch to fully supporting otg.
- */
-&usb_otg {
-	dr_mode = "host";
-	status = "okay";
-};
-
 &usbphy {
 	usb1_vbus-supply = <&reg_dldo1>;
-	status = "okay";
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 12/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for ga10h dts
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (10 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 11/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for gt90h dts Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 13/15] ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h Hans de Goede
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

This results in quite a nice cleanup for this dts file.

As an added bonus this also enables backlight, regulator and full otg
support. I've tested that all these works as advertised.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 77 +-----------------------------
 1 file changed, 1 insertion(+), 76 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
index 1aefc67..6566032 100644
--- a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
@@ -42,59 +42,18 @@
 
 /dts-v1/;
 #include "sun8i-a33.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include "sun8i-reference-design-tablet.dtsi"
 
 / {
 	model = "Allwinner GA10H Quad Core Tablet (v1.1)";
 	compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33";
-
-	aliases {
-		serial0 = &r_uart;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
 };
 
 &ehci0 {
 	status = "okay";
 };
 
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
-	status = "okay";
-};
-
-&i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
-	status = "okay";
-};
-
 &lradc {
-	vref-supply = <&reg_vcc3v0>;
-	status = "okay";
-
-	button at 200 {
-		label = "Volume Up";
-		linux,code = <KEY_VOLUMEUP>;
-		channel = <0>;
-		voltage = <200000>;
-	};
-
-	button at 400 {
-		label = "Volume Down";
-		linux,code = <KEY_VOLUMEDOWN>;
-		channel = <0>;
-		voltage = <400000>;
-	};
-
 	button at 600 {
 		label = "Back";
 		linux,code = <KEY_BACK>;
@@ -103,40 +62,6 @@
 	};
 };
 
-&mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8h>;
-	vmmc-supply = <&reg_vcc3v0>;
-	bus-width = <4>;
-	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
-	cd-inverted;
-	status = "okay";
-};
-
 &ohci0 {
 	status = "okay";
 };
-
-&pio {
-	mmc0_cd_pin_q8h: mmc0_cd_pin at 0 {
-		allwinner,pins = "PB4";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-};
-
-&r_uart {
-	pinctrl-names = "default";
-	pinctrl-0 = <&r_uart_pins_a>;
-	status = "okay";
-};
-
-&usb_otg {
-	dr_mode = "host";
-	status = "okay";
-};
-
-&usbphy {
-	status = "okay";
-};
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 13/15] ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (11 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 12/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for ga10h dts Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-11  6:39   ` Maxime Ripard
  2016-07-08 16:05 ` [PATCH 14/15] ARM: dts: sun8i: Add dts file for Polaroid MID2407PXE03 tablet Hans de Goede
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

The ga10h tablet has a rtl8703as wifi chip, add a dt node describing it.

This enables usage of wifi on this tablet (together with the out of
tree rtl8732bs driver).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
index 6566032..de6269d 100644
--- a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
@@ -47,6 +47,11 @@
 / {
 	model = "Allwinner GA10H Quad Core Tablet (v1.1)";
 	compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33";
+
+	aliases {
+		/* Make u-boot set mac-address for rtl8703as (no eeprom) */
+		ethernet0 = &rtl8703as;
+	};
 };
 
 &ehci0 {
@@ -62,6 +67,19 @@
 	};
 };
 
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins_a>;
+	vmmc-supply = <&reg_dldo1>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+
+	rtl8703as: sdio_wifi at 1 {
+		reg = <1>;
+	};
+};
+
 &ohci0 {
 	status = "okay";
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 14/15] ARM: dts: sun8i: Add dts file for Polaroid MID2407PXE03 tablet
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (12 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 13/15] ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-08 16:05 ` [PATCH 15/15] ARM: dts: sun8i: Add dts file for inet86dz board Hans de Goede
  2016-07-11  6:39 ` [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Maxime Ripard
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

The Polaroid MID2407PXE03 is an a23 based 7" tablet based on a M86_MB V2.0
PCB, featuring a 800x480 LCD, 512MB RAM, 4G NAND, esp8089 wifi, gsl1680
touchschreen, micro-sd slot, 3.5mm headphone jack and a micro-usb otg
connector which doubles as charging port.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Use sun8i-reference-design-tablet.dtsi
-Note this makes the dts pretty much empty for now, this will change
 once the touchscreen driver + some mmc-pwrseq changes for the sdio wifi
 land upstream
---
 arch/arm/boot/dts/Makefile                         |  1 +
 .../boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts   | 50 ++++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e9fcd25..fca6811 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -755,6 +755,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
 	sun8i-a23-gt90h-v4.dtb \
 	sun8i-a23-ippo-q8h-v5.dtb \
 	sun8i-a23-ippo-q8h-v1.2.dtb \
+	sun8i-a23-polaroid-mid2407pxe03.dtb \
 	sun8i-a23-polaroid-mid2809pxe04.dtb \
 	sun8i-a23-q8-tablet.dtb \
 	sun8i-a33-et-q8-v1.6.dtb \
diff --git a/arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts b/arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts
new file mode 100644
index 0000000..e300442
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * 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
+ *     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.
+ */
+
+/dts-v1/;
+#include "sun8i-a23.dtsi"
+#include "sun8i-reference-design-tablet.dtsi"
+
+/ {
+	model = "Polaroid MID2407PXE03 tablet";
+	compatible = "polaroid,mid2407pxe03", "allwinner,sun8i-a23";
+};
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 15/15] ARM: dts: sun8i: Add dts file for inet86dz board
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (13 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 14/15] ARM: dts: sun8i: Add dts file for Polaroid MID2407PXE03 tablet Hans de Goede
@ 2016-07-08 16:05 ` Hans de Goede
  2016-07-11  6:39 ` [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Maxime Ripard
  15 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-08 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

The inet86dz board is a board used in 7" tablets from various oems.

These tablets are a23 based 7" tablets featuring a 1024x600 LCD,
512MB RAM, 4G NAND, rtl8188etv usb wifi, gsl1680 touchschreen,
micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector
which doubles as charging port.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Use sun8i-reference-design-tablet.dtsi
---
 arch/arm/boot/dts/Makefile               |  1 +
 arch/arm/boot/dts/sun8i-a23-inet86dz.dts | 58 ++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun8i-a23-inet86dz.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index fca6811..92eb004 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -753,6 +753,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
 dtb-$(CONFIG_MACH_SUN8I) += \
 	sun8i-a23-evb.dtb \
 	sun8i-a23-gt90h-v4.dtb \
+	sun8i-a23-inet86dz.dtb \
 	sun8i-a23-ippo-q8h-v5.dtb \
 	sun8i-a23-ippo-q8h-v1.2.dtb \
 	sun8i-a23-polaroid-mid2407pxe03.dtb \
diff --git a/arch/arm/boot/dts/sun8i-a23-inet86dz.dts b/arch/arm/boot/dts/sun8i-a23-inet86dz.dts
new file mode 100644
index 0000000..0f9f71b
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-a23-inet86dz.dts
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * 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
+ *     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.
+ */
+
+/dts-v1/;
+#include "sun8i-a23.dtsi"
+#include "sun8i-reference-design-tablet.dtsi"
+
+/ {
+	model = "INet-86DZ Rev 01";
+	compatible = "primux,inet86dz", "allwinner,sun8i-a23";
+};
+
+&ehci0 {
+	status = "okay";
+};
+
+&usbphy {
+	usb1_vbus-supply = <&reg_dldo1>;
+};
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 05/15] ARM: dts: sun5i: reference-design-tablet: Remove mention of q8
  2016-07-08 16:05 ` [PATCH 05/15] ARM: dts: sun5i: reference-design-tablet: Remove mention of q8 Hans de Goede
@ 2016-07-09  3:53   ` Chen-Yu Tsai
  2016-07-09  9:28     ` Hans de Goede
  0 siblings, 1 reply; 22+ messages in thread
From: Chen-Yu Tsai @ 2016-07-09  3:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jul 9, 2016 at 12:05 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> Remove all mention of q8 from sun5i-reference-design-tablet.dtsi.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
> index e78452c..20cc940 100644
> --- a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
> +++ b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
> @@ -98,7 +98,7 @@
>
>  &mmc0 {
>         pinctrl-names = "default";
> -       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
> +       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>         vmmc-supply = <&reg_vcc3v0>;
>         bus-width = <4>;
>         cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
> @@ -118,7 +118,7 @@
>                 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>         };
>
> -       mmc0_cd_pin_q8: mmc0_cd_pin at 0 {
> +       mmc0_cd_pin: mmc0_cd_pin at 0 {

We could name this mmc0_cd_pin_reference_design and put it in
sun5i-a13.dtsi. We already do this for A10/A20.

This works equally well though.

Acked-by: Chen-Yu Tsai <wens@csie.org>

>                 allwinner,pins = "PG0";
>                 allwinner,function = "gpio_in";
>                 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 05/15] ARM: dts: sun5i: reference-design-tablet: Remove mention of q8
  2016-07-09  3:53   ` Chen-Yu Tsai
@ 2016-07-09  9:28     ` Hans de Goede
  0 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-07-09  9:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 09-07-16 05:53, Chen-Yu Tsai wrote:
> On Sat, Jul 9, 2016 at 12:05 AM, Hans de Goede <hdegoede@redhat.com> wrote:
>> Remove all mention of q8 from sun5i-reference-design-tablet.dtsi.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>  arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
>> index e78452c..20cc940 100644
>> --- a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
>> +++ b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
>> @@ -98,7 +98,7 @@
>>
>>  &mmc0 {
>>         pinctrl-names = "default";
>> -       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
>> +       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>>         vmmc-supply = <&reg_vcc3v0>;
>>         bus-width = <4>;
>>         cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
>> @@ -118,7 +118,7 @@
>>                 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>>         };
>>
>> -       mmc0_cd_pin_q8: mmc0_cd_pin at 0 {
>> +       mmc0_cd_pin: mmc0_cd_pin at 0 {
>
> We could name this mmc0_cd_pin_reference_design and put it in
> sun5i-a13.dtsi. We already do this for A10/A20.

I would prefer to keep this this way, I was never really fond
of the A10/A20 solution, in retrospect we should have done
a sun4i-a10-reference-design.dtsi defining a lot more stuff
then just the cd_pin.

> This works equally well though.
>
> Acked-by: Chen-Yu Tsai <wens@csie.org>

Thanks.

Regards,

Hans


>
>>                 allwinner,pins = "PG0";
>>                 allwinner,function = "gpio_in";
>>                 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> --
>> 2.7.4
>>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 13/15] ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h
  2016-07-08 16:05 ` [PATCH 13/15] ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h Hans de Goede
@ 2016-07-11  6:39   ` Maxime Ripard
  2016-07-11 12:36     ` Hans de Goede
  0 siblings, 1 reply; 22+ messages in thread
From: Maxime Ripard @ 2016-07-11  6:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Fri, Jul 08, 2016 at 06:05:54PM +0200, Hans de Goede wrote:
> The ga10h tablet has a rtl8703as wifi chip, add a dt node describing it.
> 
> This enables usage of wifi on this tablet (together with the out of
> tree rtl8732bs driver).
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
> index 6566032..de6269d 100644
> --- a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
> +++ b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
> @@ -47,6 +47,11 @@
>  / {
>  	model = "Allwinner GA10H Quad Core Tablet (v1.1)";
>  	compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33";
> +
> +	aliases {
> +		/* Make u-boot set mac-address for rtl8703as (no eeprom) */
> +		ethernet0 = &rtl8703as;
> +	};
>  };
>  
>  &ehci0 {
> @@ -62,6 +67,19 @@
>  	};
>  };
>  
> +&mmc1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc1_pins_a>;
> +	vmmc-supply = <&reg_dldo1>;
> +	bus-width = <4>;
> +	non-removable;
> +	status = "okay";
> +
> +	rtl8703as: sdio_wifi at 1 {

Shouldn't that need a compatible ?

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160711/fd1e428f/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets
  2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
                   ` (14 preceding siblings ...)
  2016-07-08 16:05 ` [PATCH 15/15] ARM: dts: sun8i: Add dts file for inet86dz board Hans de Goede
@ 2016-07-11  6:39 ` Maxime Ripard
  15 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2016-07-11  6:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 08, 2016 at 06:05:41PM +0200, Hans de Goede wrote:
> Hi Maxime, Chen-Yu,
> 
> Here is a series based on Chen-Yu's suggestion to add a
> reference-design-tablet.dtsi file. This works out quite
> nicely, resulting in much simpler tablet .dts files, as
> well as enabling a bunch of extra features on some tablets,
> showing that having to add the same dts bits over and over
> again for all model tablets is not a good idea.
> 
> This also includes a v2 submission of the new tablet dts
> files which sparked the reference-design-tablet.dtsi
> discussion.

Beside the minor comment on patch 13, applied everything.

Thanks, this is a very nice cleanup.
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160711/2d0840eb/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 13/15] ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h
  2016-07-11  6:39   ` Maxime Ripard
@ 2016-07-11 12:36     ` Hans de Goede
  2016-07-13  7:18       ` Maxime Ripard
  0 siblings, 1 reply; 22+ messages in thread
From: Hans de Goede @ 2016-07-11 12:36 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 11-07-16 08:39, Maxime Ripard wrote:
> Hi,
>
> On Fri, Jul 08, 2016 at 06:05:54PM +0200, Hans de Goede wrote:
>> The ga10h tablet has a rtl8703as wifi chip, add a dt node describing it.
>>
>> This enables usage of wifi on this tablet (together with the out of
>> tree rtl8732bs driver).
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>  arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 18 ++++++++++++++++++
>>  1 file changed, 18 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
>> index 6566032..de6269d 100644
>> --- a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
>> +++ b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
>> @@ -47,6 +47,11 @@
>>  / {
>>  	model = "Allwinner GA10H Quad Core Tablet (v1.1)";
>>  	compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33";
>> +
>> +	aliases {
>> +		/* Make u-boot set mac-address for rtl8703as (no eeprom) */
>> +		ethernet0 = &rtl8703as;
>> +	};
>>  };
>>
>>  &ehci0 {
>> @@ -62,6 +67,19 @@
>>  	};
>>  };
>>
>> +&mmc1 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&mmc1_pins_a>;
>> +	vmmc-supply = <&reg_dldo1>;
>> +	bus-width = <4>;
>> +	non-removable;
>> +	status = "okay";
>> +
>> +	rtl8703as: sdio_wifi at 1 {
>
> Shouldn't that need a compatible ?

There is no upstream driver yet, so no devicetree binding for the specific
wifi chip used. But all we really need is to follow generic sdio / network
bindings:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-card.txt

Describes how to create a mmc-host child-node describing an (e)mmc-card or
sdio-function, in this case we are adding a node for sdio-function 1,
hence the reg = <1>; in the child-node.

Linux implementation wise, this will make the mmc core set the dev->of_node
ptr to this node for the struct device it passes into the sdio-drivers
probe function.

And u-boot will add a local-mac-address property as documented here:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet.txt

to the node pointed to by ethernet%d aliases.

To actually make use of this I've modified the out of tree driver to check
for the "local-mac-address" property:

https://github.com/jwrdegoede/rtl8723bs/commit/be5e87ea71677120ede457213208902ed9942653

So that each device actually gets a unique address rather then the
(stupid) behavior of the out of tree driver to set the same fixes
mac address on every device which does not have a mac address in
eeprom / nvram.

Since this follows the existing ethernet bindings standard I
believe the dts bits can go upstream as is, but since there
is no upstream-able driver yet, I do not believe that making up
a compatible string to add to the child-node is a good idea.

More-over on q8 tablets we will want to do the same (again for
eeprom / nvram less boards) but without pinning ourselves to
a specific sdio-wifi module / compatible, instead relying on
sdio enumeration to figure out which sdio-wifi module is present.

Regards,

Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 13/15] ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h
  2016-07-11 12:36     ` Hans de Goede
@ 2016-07-13  7:18       ` Maxime Ripard
  0 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2016-07-13  7:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 11, 2016 at 02:36:43PM +0200, Hans de Goede wrote:
> >>+&mmc1 {
> >>+	pinctrl-names = "default";
> >>+	pinctrl-0 = <&mmc1_pins_a>;
> >>+	vmmc-supply = <&reg_dldo1>;
> >>+	bus-width = <4>;
> >>+	non-removable;
> >>+	status = "okay";
> >>+
> >>+	rtl8703as: sdio_wifi at 1 {
> >
> >Shouldn't that need a compatible ?
> 
> There is no upstream driver yet, so no devicetree binding for the specific
> wifi chip used. But all we really need is to follow generic sdio / network
> bindings:
> 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-card.txt
> 
> Describes how to create a mmc-host child-node describing an (e)mmc-card or
> sdio-function, in this case we are adding a node for sdio-function 1,
> hence the reg = <1>; in the child-node.

Both that file and
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc.txt
list the compatible property as mandatory.

> 
> Linux implementation wise, this will make the mmc core set the dev->of_node
> ptr to this node for the struct device it passes into the sdio-drivers
> probe function.
> 
> And u-boot will add a local-mac-address property as documented here:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet.txt
> 
> to the node pointed to by ethernet%d aliases.
> 
> To actually make use of this I've modified the out of tree driver to check
> for the "local-mac-address" property:
> 
> https://github.com/jwrdegoede/rtl8723bs/commit/be5e87ea71677120ede457213208902ed9942653
> 
> So that each device actually gets a unique address rather then the
> (stupid) behavior of the out of tree driver to set the same fixes
> mac address on every device which does not have a mac address in
> eeprom / nvram.
> 
> Since this follows the existing ethernet bindings standard I
> believe the dts bits can go upstream as is, but since there
> is no upstream-able driver yet, I do not believe that making up
> a compatible string to add to the child-node is a good idea.
> 
> More-over on q8 tablets we will want to do the same (again for
> eeprom / nvram less boards) but without pinning ourselves to
> a specific sdio-wifi module / compatible, instead relying on
> sdio enumeration to figure out which sdio-wifi module is present.

Feel free to raise that issue to the DT maintainers. But this patch
breaks the existing bindings, so it cannot be merged as is.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160713/b9fe20fb/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-07-13  7:18 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08 16:05 [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Hans de Goede
2016-07-08 16:05 ` [PATCH 01/15] ARM: dts: sunxi: Rename sunxi-q8-common.dtsi sunxi-reference-design-tablet.dtsi Hans de Goede
2016-07-08 16:05 ` [PATCH 02/15] ARM: dts: sun5i: Move q8 display bits to sun5i-a13-q8-tablet.dts Hans de Goede
2016-07-08 16:05 ` [PATCH 03/15] ARM: dts: sun5i: Rename sun5i-q8-common.dtsi sun5i-reference-design-tablet.dtsi Hans de Goede
2016-07-08 16:05 ` [PATCH 04/15] ARM: dts: sun5i: reference-design-tablet: Set lradc vref to avcc Hans de Goede
2016-07-08 16:05 ` [PATCH 05/15] ARM: dts: sun5i: reference-design-tablet: Remove mention of q8 Hans de Goede
2016-07-09  3:53   ` Chen-Yu Tsai
2016-07-09  9:28     ` Hans de Goede
2016-07-08 16:05 ` [PATCH 06/15] ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for dit4350 dts Hans de Goede
2016-07-08 16:05 ` [PATCH 07/15] ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for utoo p66 dts Hans de Goede
2016-07-08 16:05 ` [PATCH 08/15] ARM: dts: Copy sun8i-q8-common.dtsi sun8i-reference-design-tablet.dtsi Hans de Goede
2016-07-08 16:05 ` [PATCH 09/15] ARM: dts: sun8i: reference-design-tablet: Add drivevbus-supply Hans de Goede
2016-07-08 16:05 ` [PATCH 10/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for polaroid mid2809pxe04 Hans de Goede
2016-07-08 16:05 ` [PATCH 11/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for gt90h dts Hans de Goede
2016-07-08 16:05 ` [PATCH 12/15] ARM: dts: sun8i: Use sun8i-reference-design-tablet for ga10h dts Hans de Goede
2016-07-08 16:05 ` [PATCH 13/15] ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h Hans de Goede
2016-07-11  6:39   ` Maxime Ripard
2016-07-11 12:36     ` Hans de Goede
2016-07-13  7:18       ` Maxime Ripard
2016-07-08 16:05 ` [PATCH 14/15] ARM: dts: sun8i: Add dts file for Polaroid MID2407PXE03 tablet Hans de Goede
2016-07-08 16:05 ` [PATCH 15/15] ARM: dts: sun8i: Add dts file for inet86dz board Hans de Goede
2016-07-11  6:39 ` [PATCH 00/15] ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).