All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ARM: dts: sun8i: a33: Improvements for A33-OLinuXino
@ 2018-03-12  4:23 ` Chen-Yu Tsai
  0 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Hi,

Here are some cleanup and improvements for the A33-OLinuXino device
tree. The first two patches drop some unneeded bits. The latter two
enable peripherals that we now support.

ChenYu

Chen-Yu Tsai (4):
  ARM: dts: sun8i: a33: Drop GPIO pinmux settings for A33-OLinuXino
  ARM: dts: sun8i: a33: Drop sunxi-common-regulators.dtsi for
    A33-OLinuXino
  ARM: dts: sun8i: a33: Enable PMIC power supplies on A33-OLinuXino
  ARM: dts: sun8i: a33: Enable A33 internal audio codec on A33-OLinuXino

 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 55 ++++++++++++++++++-------------
 1 file changed, 32 insertions(+), 23 deletions(-)

-- 
2.16.2

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

* [PATCH 0/4] ARM: dts: sun8i: a33: Improvements for A33-OLinuXino
@ 2018-03-12  4:23 ` Chen-Yu Tsai
  0 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Here are some cleanup and improvements for the A33-OLinuXino device
tree. The first two patches drop some unneeded bits. The latter two
enable peripherals that we now support.

ChenYu

Chen-Yu Tsai (4):
  ARM: dts: sun8i: a33: Drop GPIO pinmux settings for A33-OLinuXino
  ARM: dts: sun8i: a33: Drop sunxi-common-regulators.dtsi for
    A33-OLinuXino
  ARM: dts: sun8i: a33: Enable PMIC power supplies on A33-OLinuXino
  ARM: dts: sun8i: a33: Enable A33 internal audio codec on A33-OLinuXino

 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 55 ++++++++++++++++++-------------
 1 file changed, 32 insertions(+), 23 deletions(-)

-- 
2.16.2

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

* [PATCH 1/4] ARM: dts: sun8i: a33: Drop GPIO pinmux settings for A33-OLinuXino
  2018-03-12  4:23 ` Chen-Yu Tsai
@ 2018-03-12  4:23   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Normal GPIO usage does not need an additional pinmix setting. Exclusive
usage of the pin will be guaranteed by the driver.

Drop the extra pinmux settings.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
index 9757265c58d4..6349e0bec9a3 100644
--- a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
+++ b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
@@ -62,8 +62,6 @@
 
 	leds {
 		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 = <&led_pin_olinuxino>;
 
 		green {
 			label = "a33-olinuxino:green:usr";
@@ -78,7 +76,7 @@
 
 &mmc0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
+	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_dcdc1>;
 	bus-width = <4>;
 	cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB4 */
@@ -89,23 +87,6 @@
 	status = "okay";
 };
 
-&pio {
-	led_pin_olinuxino: led_pins@0 {
-		pins = "PB7";
-		function = "gpio_out";
-	};
-
-	mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
-		pins = "PB4";
-		function = "gpio_in";
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin@0 {
-		pins = "PB3";
-		function = "gpio_in";
-	};
-};
-
 &r_rsb {
 	status = "okay";
 
@@ -210,8 +191,6 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>;
 	usb0_id_det-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
 	usb0_vbus_power-supply = <&usb_power_supply>;
 	usb0_vbus-supply = <&reg_drivevbus>;
-- 
2.16.2

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

* [PATCH 1/4] ARM: dts: sun8i: a33: Drop GPIO pinmux settings for A33-OLinuXino
@ 2018-03-12  4:23   ` Chen-Yu Tsai
  0 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: linux-arm-kernel

Normal GPIO usage does not need an additional pinmix setting. Exclusive
usage of the pin will be guaranteed by the driver.

Drop the extra pinmux settings.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
index 9757265c58d4..6349e0bec9a3 100644
--- a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
+++ b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
@@ -62,8 +62,6 @@
 
 	leds {
 		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 = <&led_pin_olinuxino>;
 
 		green {
 			label = "a33-olinuxino:green:usr";
@@ -78,7 +76,7 @@
 
 &mmc0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
+	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_dcdc1>;
 	bus-width = <4>;
 	cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB4 */
@@ -89,23 +87,6 @@
 	status = "okay";
 };
 
-&pio {
-	led_pin_olinuxino: led_pins at 0 {
-		pins = "PB7";
-		function = "gpio_out";
-	};
-
-	mmc0_cd_pin_olinuxino: mmc0_cd_pin at 0 {
-		pins = "PB4";
-		function = "gpio_in";
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-		pins = "PB3";
-		function = "gpio_in";
-	};
-};
-
 &r_rsb {
 	status = "okay";
 
@@ -210,8 +191,6 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>;
 	usb0_id_det-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
 	usb0_vbus_power-supply = <&usb_power_supply>;
 	usb0_vbus-supply = <&reg_drivevbus>;
-- 
2.16.2

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

* [PATCH 2/4] ARM: dts: sun8i: a33: Drop sunxi-common-regulators.dtsi for A33-OLinuXino
  2018-03-12  4:23 ` Chen-Yu Tsai
@ 2018-03-12  4:23   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

None of the common regulators defined in sunxi-common-regulators.dtsi
are used for the A33-OLinuXino.

Drop the include.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
index 6349e0bec9a3..925a5339711f 100644
--- a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
+++ b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
@@ -43,7 +43,6 @@
 
 /dts-v1/;
 #include "sun8i-a33.dtsi"
-#include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
-- 
2.16.2

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

* [PATCH 2/4] ARM: dts: sun8i: a33: Drop sunxi-common-regulators.dtsi for A33-OLinuXino
@ 2018-03-12  4:23   ` Chen-Yu Tsai
  0 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: linux-arm-kernel

None of the common regulators defined in sunxi-common-regulators.dtsi
are used for the A33-OLinuXino.

Drop the include.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
index 6349e0bec9a3..925a5339711f 100644
--- a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
+++ b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
@@ -43,7 +43,6 @@
 
 /dts-v1/;
 #include "sun8i-a33.dtsi"
-#include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
-- 
2.16.2

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

* [PATCH 3/4] ARM: dts: sun8i: a33: Enable PMIC power supplies on A33-OLinuXino
  2018-03-12  4:23 ` Chen-Yu Tsai
@ 2018-03-12  4:23   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

The A33-OLinuXino has a DC jack wired to the onboard PMIC's ACIN pins.
There is also a battery connector, wired to the PMIC's battery charger.

Enable the power supplies for both these components.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
index 925a5339711f..7f8a481af570 100644
--- a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
+++ b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
@@ -101,6 +101,14 @@
 
 #include "axp223.dtsi"
 
+&ac_power_supply {
+	status = "okay";
+};
+
+&battery_power_supply {
+	status = "okay";
+};
+
 &reg_aldo1 {
 	regulator-always-on;
 	regulator-min-microvolt = <3300000>;
-- 
2.16.2

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

* [PATCH 3/4] ARM: dts: sun8i: a33: Enable PMIC power supplies on A33-OLinuXino
@ 2018-03-12  4:23   ` Chen-Yu Tsai
  0 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: linux-arm-kernel

The A33-OLinuXino has a DC jack wired to the onboard PMIC's ACIN pins.
There is also a battery connector, wired to the PMIC's battery charger.

Enable the power supplies for both these components.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
index 925a5339711f..7f8a481af570 100644
--- a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
+++ b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
@@ -101,6 +101,14 @@
 
 #include "axp223.dtsi"
 
+&ac_power_supply {
+	status = "okay";
+};
+
+&battery_power_supply {
+	status = "okay";
+};
+
 &reg_aldo1 {
 	regulator-always-on;
 	regulator-min-microvolt = <3300000>;
-- 
2.16.2

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

* [PATCH 4/4] ARM: dts: sun8i: a33: Enable A33 internal audio codec on A33-OLinuXino
  2018-03-12  4:23 ` Chen-Yu Tsai
@ 2018-03-12  4:23   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

The A33-OLinuXino routes the SoC's headphone output to a headphone jack,
and the microphone input to a microphone jack. Power to the microphone
is provided by MBIAS.

This patch enables the various parts of the codec, and adds widgets and
routes for simple-card.

HBIAS is connected to the microphone jack as well, but in a manner that
is confusing and likely does not provide power. This part is left out
of this patch.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
index 7f8a481af570..a1a1eb64caeb 100644
--- a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
+++ b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
@@ -69,6 +69,14 @@
 	};
 };
 
+&codec {
+	status = "okay";
+};
+
+&dai {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -182,6 +190,21 @@
 	vcc-lcd-supply = <&reg_dc1sw>;
 };
 
+&sound {
+	/* Board level jack widgets */
+	simple-audio-card,widgets = "Microphone", "Microphone Jack",
+				    "Headphone", "Headphone Jack";
+	/* Board level routing. First 2 routes copied from SoC level */
+	simple-audio-card,routing =
+		"Left DAC", "AIF1 Slot 0 Left",
+		"Right DAC", "AIF1 Slot 0 Right",
+		"HP", "HPCOM",
+		"Headphone Jack", "HP",
+		"MIC1", "Microphone Jack",
+		"Microphone Jack", "MBIAS";
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_b>;
-- 
2.16.2

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

* [PATCH 4/4] ARM: dts: sun8i: a33: Enable A33 internal audio codec on A33-OLinuXino
@ 2018-03-12  4:23   ` Chen-Yu Tsai
  0 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2018-03-12  4:23 UTC (permalink / raw)
  To: linux-arm-kernel

The A33-OLinuXino routes the SoC's headphone output to a headphone jack,
and the microphone input to a microphone jack. Power to the microphone
is provided by MBIAS.

This patch enables the various parts of the codec, and adds widgets and
routes for simple-card.

HBIAS is connected to the microphone jack as well, but in a manner that
is confusing and likely does not provide power. This part is left out
of this patch.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
index 7f8a481af570..a1a1eb64caeb 100644
--- a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
+++ b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
@@ -69,6 +69,14 @@
 	};
 };
 
+&codec {
+	status = "okay";
+};
+
+&dai {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -182,6 +190,21 @@
 	vcc-lcd-supply = <&reg_dc1sw>;
 };
 
+&sound {
+	/* Board level jack widgets */
+	simple-audio-card,widgets = "Microphone", "Microphone Jack",
+				    "Headphone", "Headphone Jack";
+	/* Board level routing. First 2 routes copied from SoC level */
+	simple-audio-card,routing =
+		"Left DAC", "AIF1 Slot 0 Left",
+		"Right DAC", "AIF1 Slot 0 Right",
+		"HP", "HPCOM",
+		"Headphone Jack", "HP",
+		"MIC1", "Microphone Jack",
+		"Microphone Jack", "MBIAS";
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_b>;
-- 
2.16.2

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

* Re: [PATCH 0/4] ARM: dts: sun8i: a33: Improvements for A33-OLinuXino
  2018-03-12  4:23 ` Chen-Yu Tsai
@ 2018-03-12  8:44   ` Maxime Ripard
  -1 siblings, 0 replies; 12+ messages in thread
From: Maxime Ripard @ 2018-03-12  8:44 UTC (permalink / raw)
  To: Chen-Yu Tsai; +Cc: devicetree, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

On Mon, Mar 12, 2018 at 12:23:52PM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> Here are some cleanup and improvements for the A33-OLinuXino device
> tree. The first two patches drop some unneeded bits. The latter two
> enable peripherals that we now support.

Applied all four, thanks!
Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH 0/4] ARM: dts: sun8i: a33: Improvements for A33-OLinuXino
@ 2018-03-12  8:44   ` Maxime Ripard
  0 siblings, 0 replies; 12+ messages in thread
From: Maxime Ripard @ 2018-03-12  8:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 12, 2018 at 12:23:52PM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> Here are some cleanup and improvements for the A33-OLinuXino device
> tree. The first two patches drop some unneeded bits. The latter two
> enable peripherals that we now support.

Applied all four, thanks!
Maxime

-- 
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/20180312/4a6fa650/attachment.sig>

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

end of thread, other threads:[~2018-03-12  8:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12  4:23 [PATCH 0/4] ARM: dts: sun8i: a33: Improvements for A33-OLinuXino Chen-Yu Tsai
2018-03-12  4:23 ` Chen-Yu Tsai
2018-03-12  4:23 ` [PATCH 1/4] ARM: dts: sun8i: a33: Drop GPIO pinmux settings " Chen-Yu Tsai
2018-03-12  4:23   ` Chen-Yu Tsai
2018-03-12  4:23 ` [PATCH 2/4] ARM: dts: sun8i: a33: Drop sunxi-common-regulators.dtsi " Chen-Yu Tsai
2018-03-12  4:23   ` Chen-Yu Tsai
2018-03-12  4:23 ` [PATCH 3/4] ARM: dts: sun8i: a33: Enable PMIC power supplies on A33-OLinuXino Chen-Yu Tsai
2018-03-12  4:23   ` Chen-Yu Tsai
2018-03-12  4:23 ` [PATCH 4/4] ARM: dts: sun8i: a33: Enable A33 internal audio codec " Chen-Yu Tsai
2018-03-12  4:23   ` Chen-Yu Tsai
2018-03-12  8:44 ` [PATCH 0/4] ARM: dts: sun8i: a33: Improvements for A33-OLinuXino Maxime Ripard
2018-03-12  8:44   ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.