LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ
@ 2019-05-24 18:19 Martin Blumenstingl
  2019-05-24 18:19 ` [PATCH 1/1] ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805 Martin Blumenstingl
  2019-05-24 19:42 ` [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ Kevin Hilman
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-05-24 18:19 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: linux-arm-kernel, linux-kernel, hexdump0815, Martin Blumenstingl

A while ago a user asked on #linux-amlogic about the state of the
TRONFY MXQ in mainline. I did some research (mainly downloading an
Android firmware image for that device and looking at the .dtb) and
updated the mainline .dts accordingly.

I kept this patch in my tree but didn't hear back from anyone with one
of these boards (who could actually test my patch). That was until
today where I got the following message on IRC:
  any plans to submit your latest own version of the meson8b mxq dtb
  to mainline? it works really well for me and the one in mainline is
  too simple to be usedful ...

Thus I believe that this patch is finally ready for being included
upstream!


Martin Blumenstingl (1):
  ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805

 arch/arm/boot/dts/meson8b-mxq.dts | 139 ++++++++++++++++++++++++++++++
 1 file changed, 139 insertions(+)

-- 
2.21.0


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

* [PATCH 1/1] ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805
  2019-05-24 18:19 [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ Martin Blumenstingl
@ 2019-05-24 18:19 ` Martin Blumenstingl
  2019-05-27 13:17   ` hex dump
       [not found]   ` <CAKTihDVyQqq82KKofCTKoUYJOyT6T738uq_A=kiEqahDx9YQfA@mail.gmail.com>
  2019-05-24 19:42 ` [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ Kevin Hilman
  1 sibling, 2 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-05-24 18:19 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: linux-arm-kernel, linux-kernel, hexdump0815, Martin Blumenstingl

The TRONFY MXQ comes with either 1GB or 2GB RAM.

Both variants share (like most boards based on Amlogic reference
designs):
- 10/100 PHY (IC Plus IP101GR) with GPIOH_4 being the reset line and
  GPIOH_3 the interrupt line
- SD card slot with the card detection GPIO at CARD_6
- VCCK is generated by PWM_C with a period of 1148ns and XTAL as input
  clock
- USB OTG exposed on one of the USB-A connectors
- 4-port USB hub with 3 ports exposed to the outside

There seem the multiple board revision out there according to various
forum posts:
- storage: eMMC or NAND flash
- wifi: Ampak AP6210 or Realtek 8189

Add support for the following functionality:
- SoC temperature (hwmon)
- changing the CPU voltage
- Ethernet connectivity
- SD card
- USB

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8b-mxq.dts | 139 ++++++++++++++++++++++++++++++
 1 file changed, 139 insertions(+)

diff --git a/arch/arm/boot/dts/meson8b-mxq.dts b/arch/arm/boot/dts/meson8b-mxq.dts
index 08ddd7fb0bf8..07f1cc513f8a 100644
--- a/arch/arm/boot/dts/meson8b-mxq.dts
+++ b/arch/arm/boot/dts/meson8b-mxq.dts
@@ -45,6 +45,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+
 #include "meson8b.dtsi"
 
 / {
@@ -63,6 +66,126 @@
 		device_type = "memory";
 		reg = <0x40000000 0x40000000>;
 	};
+
+	iio-hwmon {
+		compatible = "iio-hwmon";
+		io-channels = <&saradc 8>;
+	};
+
+	vcck: regulator-vcck {
+		compatible = "pwm-regulator";
+
+		regulator-name = "VCCK";
+		regulator-min-microvolt = <860000>;
+		regulator-max-microvolt = <1140000>;
+
+		pwms = <&pwm_cd 0 1148 0>;
+		pwm-dutycycle-range = <100 0>;
+
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	vcc_1v8: regulator-vcc1v8 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+
+		vin-supply = <&vcc_3v3>;
+	};
+
+	vcc_3v3: regulator-vcc3v3 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		vin-supply = <&vcc_5v>;
+	};
+
+	vcc_5v: regulator-vcc5v {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
+&cpu0 {
+	cpu-supply = <&vcck>;
+};
+
+&ethmac {
+	status = "okay";
+
+	pinctrl-0 = <&eth_rmii_pins>;
+	pinctrl-names = "default";
+
+	phy-handle = <&eth_phy0>;
+	phy-mode = "rmii";
+
+	snps,reset-gpio = <&gpio GPIOH_4 0>;
+	snps,reset-delays-us = <0 10000 1000000>;
+	snps,reset-active-low;
+
+	mdio {
+		compatible = "snps,dwmac-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		eth_phy0: ethernet-phy@0 {
+			/* IC Plus IP101A/G (0x02430c54) */
+			reg = <0>;
+			icplus,select-interrupt;
+			interrupt-parent = <&gpio_intc>;
+			/* GPIOH_3 */
+			interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
+		};
+	};
+};
+
+&saradc {
+	status = "okay";
+	vref-supply = <&vcc_1v8>;
+};
+
+&sdio {
+	status = "okay";
+
+	pinctrl-0 = <&sd_b_pins>;
+	pinctrl-names = "default";
+
+	/* SD card */
+	sd_card_slot: slot@1 {
+		compatible = "mmc-slot";
+		reg = <1>;
+		status = "okay";
+
+		bus-width = <4>;
+		no-sdio;
+		cap-mmc-highspeed;
+		cap-sd-highspeed;
+		disable-wp;
+
+		cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
+
+		vmmc-supply = <&vcc_3v3>;
+	};
+};
+
+&pwm_cd {
+	status = "okay";
+	pinctrl-0 = <&pwm_c1_pins>;
+	pinctrl-names = "default";
+	clocks = <&clkc CLKID_XTAL>;
+	clock-names = "clkin0";
 };
 
 &uart_AO {
@@ -70,3 +193,19 @@
 	pinctrl-0 = <&uart_ao_a_pins>;
 	pinctrl-names = "default";
 };
+
+&usb0 {
+	status = "okay";
+};
+
+&usb0_phy {
+	status = "okay";
+};
+
+&usb1 {
+	status = "okay";
+};
+
+&usb1_phy {
+	status = "okay";
+};
-- 
2.21.0


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

* Re: [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ
  2019-05-24 18:19 [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ Martin Blumenstingl
  2019-05-24 18:19 ` [PATCH 1/1] ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805 Martin Blumenstingl
@ 2019-05-24 19:42 ` Kevin Hilman
  2019-05-24 19:52   ` Martin Blumenstingl
  1 sibling, 1 reply; 6+ messages in thread
From: Kevin Hilman @ 2019-05-24 19:42 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic
  Cc: linux-arm-kernel, linux-kernel, hexdump0815, Martin Blumenstingl

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> A while ago a user asked on #linux-amlogic about the state of the
> TRONFY MXQ in mainline. I did some research (mainly downloading an
> Android firmware image for that device and looking at the .dtb) and
> updated the mainline .dts accordingly.
>
> I kept this patch in my tree but didn't hear back from anyone with one
> of these boards (who could actually test my patch). That was until
> today where I got the following message on IRC:
>   any plans to submit your latest own version of the meson8b mxq dtb
>   to mainline? it works really well for me and the one in mainline is
>   too simple to be usedful ...

Any chance of getting a Tested-by: from that IRC user on the patch?

Kevin

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

* Re: [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ
  2019-05-24 19:42 ` [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ Kevin Hilman
@ 2019-05-24 19:52   ` Martin Blumenstingl
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-05-24 19:52 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-amlogic, linux-arm-kernel, linux-kernel, hexdump0815

On Fri, May 24, 2019 at 9:42 PM Kevin Hilman <khilman@baylibre.com> wrote:
>
> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>
> > A while ago a user asked on #linux-amlogic about the state of the
> > TRONFY MXQ in mainline. I did some research (mainly downloading an
> > Android firmware image for that device and looking at the .dtb) and
> > updated the mainline .dts accordingly.
> >
> > I kept this patch in my tree but didn't hear back from anyone with one
> > of these boards (who could actually test my patch). That was until
> > today where I got the following message on IRC:
> >   any plans to submit your latest own version of the meson8b mxq dtb
> >   to mainline? it works really well for me and the one in mainline is
> >   too simple to be usedful ...
>
> Any chance of getting a Tested-by: from that IRC user on the patch?
I CC'ed hexdump0815 so I'm hoping that he can send a Tested-by (he
left IRC before I could reply to him)

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

* Re: [PATCH 1/1] ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805
  2019-05-24 18:19 ` [PATCH 1/1] ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805 Martin Blumenstingl
@ 2019-05-27 13:17   ` hex dump
       [not found]   ` <CAKTihDVyQqq82KKofCTKoUYJOyT6T738uq_A=kiEqahDx9YQfA@mail.gmail.com>
  1 sibling, 0 replies; 6+ messages in thread
From: hex dump @ 2019-05-27 13:17 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-amlogic, Kevin Hilman, linux-arm-kernel, linux-kernel

On Fri, May 24, 2019 at 8:19 PM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> The TRONFY MXQ comes with either 1GB or 2GB RAM.
>
> Both variants share (like most boards based on Amlogic reference
> designs):
> - 10/100 PHY (IC Plus IP101GR) with GPIOH_4 being the reset line and
>   GPIOH_3 the interrupt line
> - SD card slot with the card detection GPIO at CARD_6
> - VCCK is generated by PWM_C with a period of 1148ns and XTAL as input
>   clock
> - USB OTG exposed on one of the USB-A connectors
> - 4-port USB hub with 3 ports exposed to the outside
>
> There seem the multiple board revision out there according to various
> forum posts:
> - storage: eMMC or NAND flash
> - wifi: Ampak AP6210 or Realtek 8189
>
> Add support for the following functionality:
> - SoC temperature (hwmon)
> - changing the CPU voltage
> - Ethernet connectivity
> - SD card
> - USB
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: hexdump <hexdump0815@googlemail.com>

BEFORE (no patches from this series applied):
the mxq device was not really useable with the old mainline dtb as
most peripeherals were not supported

AFTER (the patch applied):
the rresulting dtb works perfectly fine with my mxq device and all
mentioned supported functions work as expected

best wishes - hexdump

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

* Re: [PATCH 1/1] ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805
       [not found]   ` <CAKTihDVyQqq82KKofCTKoUYJOyT6T738uq_A=kiEqahDx9YQfA@mail.gmail.com>
@ 2019-06-03 22:18     ` Kevin Hilman
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2019-06-03 22:18 UTC (permalink / raw)
  To: hex dump, Martin Blumenstingl
  Cc: linux-amlogic, linux-arm-kernel, linux-kernel

hex dump <hexdump0815@gmail.com> writes:

> Am Fr., 24. Mai 2019 um 20:19 Uhr schrieb Martin Blumenstingl <
> martin.blumenstingl@googlemail.com>:
>
>> The TRONFY MXQ comes with either 1GB or 2GB RAM.
>>
>> Both variants share (like most boards based on Amlogic reference
>> designs):
>> - 10/100 PHY (IC Plus IP101GR) with GPIOH_4 being the reset line and
>>   GPIOH_3 the interrupt line
>> - SD card slot with the card detection GPIO at CARD_6
>> - VCCK is generated by PWM_C with a period of 1148ns and XTAL as input
>>   clock
>> - USB OTG exposed on one of the USB-A connectors
>> - 4-port USB hub with 3 ports exposed to the outside
>>
>> There seem the multiple board revision out there according to various
>> forum posts:
>> - storage: eMMC or NAND flash
>> - wifi: Ampak AP6210 or Realtek 8189
>>
>> Add support for the following functionality:
>> - SoC temperature (hwmon)
>> - changing the CPU voltage
>> - Ethernet connectivity
>> - SD card
>> - USB
>>
>> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>>
>
> Tested-by: hexdump <hexdump0815@googlemail.com>

Thanks for testing.

Queued for v5,3,

Kevin

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

end of thread, other threads:[~2019-06-03 22:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 18:19 [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ Martin Blumenstingl
2019-05-24 18:19 ` [PATCH 1/1] ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805 Martin Blumenstingl
2019-05-27 13:17   ` hex dump
     [not found]   ` <CAKTihDVyQqq82KKofCTKoUYJOyT6T738uq_A=kiEqahDx9YQfA@mail.gmail.com>
2019-06-03 22:18     ` Kevin Hilman
2019-05-24 19:42 ` [PATCH 0/1] ARM: meson8b-mxq: better support for the TRONFY MXQ Kevin Hilman
2019-05-24 19:52   ` Martin Blumenstingl

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).