Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* Add HWMON and WiFi support for CU1000-Neo
@ 2020-01-14 17:03 周琰杰 (Zhou Yanjie)
  2020-01-14 17:03 ` [PATCH 0/2] " 周琰杰 (Zhou Yanjie)
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: 周琰杰 (Zhou Yanjie) @ 2020-01-14 17:03 UTC (permalink / raw)
  To: linux-mips
  Cc: linux-kernel, devicetree, robh+dt, paul.burton, paulburton,
	jhogan, mark.rutland, syq, ralf, rick.tyliu, jason, keescook,
	geert+renesas, krzk, paul, prasannatsmkumar, sernia.zhou,
	zhenwenjin, ebiederm

Add I2C0/I2C1/I2C2 nodes for X1000 and add I2C0, ADS7830,
MSC1, AP6212A, wlan_pwrseq nodes for CU1000-Neo. Refresh
CU1000-Neo's defconfig to support ADS7830 based HWMON
and AP6212A WiFi module.


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

* [PATCH 0/2] Add HWMON and WiFi support for CU1000-Neo.
  2020-01-14 17:03 Add HWMON and WiFi support for CU1000-Neo 周琰杰 (Zhou Yanjie)
@ 2020-01-14 17:03 ` " 周琰杰 (Zhou Yanjie)
  2020-01-15 18:59   ` Paul Burton
  2020-01-14 17:03 ` [PATCH 1/2] MIPS: Ingenic: Add missing nodes for X1000 and CU1000-Neo 周琰杰 (Zhou Yanjie)
  2020-01-14 17:03 ` [PATCH 2/2] MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi 周琰杰 (Zhou Yanjie)
  2 siblings, 1 reply; 5+ messages in thread
From: 周琰杰 (Zhou Yanjie) @ 2020-01-14 17:03 UTC (permalink / raw)
  To: linux-mips
  Cc: linux-kernel, devicetree, robh+dt, paul.burton, paulburton,
	jhogan, mark.rutland, syq, ralf, rick.tyliu, jason, keescook,
	geert+renesas, krzk, paul, prasannatsmkumar, sernia.zhou,
	zhenwenjin, ebiederm

Add I2C0/I2C1/I2C2 nodes for X1000 and add I2C0, ADS7830,
MSC1, AP6212A, wlan_pwrseq nodes for CU1000-Neo. Refresh
CU1000-Neo's defconfig to support ADS7830 based HWMON
and AP6212A WiFi module.

周琰杰 (Zhou Yanjie) (2):
  MIPS: Ingenic: Add missing nodes for X1000 and CU1000-Neo.
  MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi.

 arch/mips/boot/dts/ingenic/cu1000-neo.dts | 71 +++++++++++++++++++++++++++++++
 arch/mips/boot/dts/ingenic/x1000.dtsi     | 45 ++++++++++++++++++++
 arch/mips/configs/cu1000-neo_defconfig    |  8 +++-
 3 files changed, 123 insertions(+), 1 deletion(-)

-- 
2.7.4


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

* [PATCH 1/2] MIPS: Ingenic: Add missing nodes for X1000 and CU1000-Neo.
  2020-01-14 17:03 Add HWMON and WiFi support for CU1000-Neo 周琰杰 (Zhou Yanjie)
  2020-01-14 17:03 ` [PATCH 0/2] " 周琰杰 (Zhou Yanjie)
@ 2020-01-14 17:03 ` 周琰杰 (Zhou Yanjie)
  2020-01-14 17:03 ` [PATCH 2/2] MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi 周琰杰 (Zhou Yanjie)
  2 siblings, 0 replies; 5+ messages in thread
From: 周琰杰 (Zhou Yanjie) @ 2020-01-14 17:03 UTC (permalink / raw)
  To: linux-mips
  Cc: linux-kernel, devicetree, robh+dt, paul.burton, paulburton,
	jhogan, mark.rutland, syq, ralf, rick.tyliu, jason, keescook,
	geert+renesas, krzk, paul, prasannatsmkumar, sernia.zhou,
	zhenwenjin, ebiederm

Add I2C0/I2C1/I2C2 nodes for X1000 and add I2C0, ADS7830,
MSC1, AP6212A, wlan_pwrseq nodes for CU1000-Neo.

Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
---
 arch/mips/boot/dts/ingenic/cu1000-neo.dts | 71 +++++++++++++++++++++++++++++++
 arch/mips/boot/dts/ingenic/x1000.dtsi     | 45 ++++++++++++++++++++
 2 files changed, 116 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/cu1000-neo.dts b/arch/mips/boot/dts/ingenic/cu1000-neo.dts
index b0733da..03abd94 100644
--- a/arch/mips/boot/dts/ingenic/cu1000-neo.dts
+++ b/arch/mips/boot/dts/ingenic/cu1000-neo.dts
@@ -4,6 +4,7 @@
 #include "x1000.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/clock/ingenic,tcu.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
 	compatible = "yna,cu1000-neo", "ingenic,x1000";
@@ -21,6 +22,22 @@
 		device_type = "memory";
 		reg = <0x0 0x04000000>;
 	};
+
+	wlan_pwrseq: msc1-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+
+		clocks = <&lpoclk>;
+		clock-names = "ext_clock";
+
+		reset-gpios = <&gpc 17 GPIO_ACTIVE_LOW>;
+		post-power-on-delay-ms = <200>;
+
+		lpoclk: ap6212a {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
 };
 
 &exclk {
@@ -36,6 +53,20 @@
 	ingenic,pwm-channels-mask = <0xfa>;
 };
 
+&i2c0 {
+	status = "okay";
+
+	clock-frequency = <400000>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pins_i2c0>;
+
+	ads7830@48 {
+		compatible = "ti,ads7830";
+		reg = <0x48>;
+	};
+};
+
 &uart2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pins_uart2>;
@@ -78,7 +109,41 @@
 	status = "okay";
 };
 
+&msc1 {
+	bus-width = <4>;
+	max-frequency = <50000000>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pins_msc1>;
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	non-removable;
+
+	mmc-pwrseq = <&wlan_pwrseq>;
+
+	status = "okay";
+
+	ap6212a: wifi@1 {
+		compatible = "brcm,bcm4329-fmac";
+		reg = <1>;
+
+		interrupt-parent = <&gpc>;
+		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-names = "host-wake";
+
+		brcm,drive-strength = <10>;
+	};
+};
+
 &pinctrl {
+	pins_i2c0: i2c0 {
+		function = "i2c0";
+		groups = "i2c0-data";
+		bias-disable;
+	};
+
 	pins_uart2: uart2 {
 		function = "uart2";
 		groups = "uart2-data-d";
@@ -96,4 +161,10 @@
 		groups = "mmc0-1bit", "mmc0-4bit", "mmc0-8bit";
 		bias-disable;
 	};
+
+	pins_msc1: msc1 {
+		function = "mmc1";
+		groups = "mmc1-1bit", "mmc1-4bit";
+		bias-disable;
+	};
 };
diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi b/arch/mips/boot/dts/ingenic/x1000.dtsi
index ea54263..376df1b 100644
--- a/arch/mips/boot/dts/ingenic/x1000.dtsi
+++ b/arch/mips/boot/dts/ingenic/x1000.dtsi
@@ -169,6 +169,51 @@
 		};
 	};
 
+	i2c0: i2c-controller@10050000 {
+		compatible = "ingenic,x1000-i2c";
+		reg = <0x10050000 0x1000>;
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		interrupt-parent = <&intc>;
+		interrupts = <60>;
+
+		clocks = <&cgu X1000_CLK_I2C0>;
+
+		status = "disabled";
+	};
+
+	i2c1: i2c-controller@10051000 {
+		compatible = "ingenic,x1000-i2c";
+		reg = <0x10051000 0x1000>;
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		interrupt-parent = <&intc>;
+		interrupts = <59>;
+
+		clocks = <&cgu X1000_CLK_I2C1>;
+
+		status = "disabled";
+	};
+
+	i2c2: i2c-controller@10052000 {
+		compatible = "ingenic,x1000-i2c";
+		reg = <0x10052000 0x1000>;
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		interrupt-parent = <&intc>;
+		interrupts = <58>;
+
+		clocks = <&cgu X1000_CLK_I2C2>;
+
+		status = "disabled";
+	};
+
 	uart0: serial@10030000 {
 		compatible = "ingenic,x1000-uart";
 		reg = <0x10030000 0x100>;
-- 
2.7.4


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

* [PATCH 2/2] MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi.
  2020-01-14 17:03 Add HWMON and WiFi support for CU1000-Neo 周琰杰 (Zhou Yanjie)
  2020-01-14 17:03 ` [PATCH 0/2] " 周琰杰 (Zhou Yanjie)
  2020-01-14 17:03 ` [PATCH 1/2] MIPS: Ingenic: Add missing nodes for X1000 and CU1000-Neo 周琰杰 (Zhou Yanjie)
@ 2020-01-14 17:03 ` 周琰杰 (Zhou Yanjie)
  2 siblings, 0 replies; 5+ messages in thread
From: 周琰杰 (Zhou Yanjie) @ 2020-01-14 17:03 UTC (permalink / raw)
  To: linux-mips
  Cc: linux-kernel, devicetree, robh+dt, paul.burton, paulburton,
	jhogan, mark.rutland, syq, ralf, rick.tyliu, jason, keescook,
	geert+renesas, krzk, paul, prasannatsmkumar, sernia.zhou,
	zhenwenjin, ebiederm

Refresh CU1000-Neo's defconfig to support ADS7830 based HWMON
and AP6212A WiFi module.

Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
---
 arch/mips/configs/cu1000-neo_defconfig | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/mips/configs/cu1000-neo_defconfig b/arch/mips/configs/cu1000-neo_defconfig
index 9f988ed..9b05a8f 100644
--- a/arch/mips/configs/cu1000-neo_defconfig
+++ b/arch/mips/configs/cu1000-neo_defconfig
@@ -34,8 +34,10 @@ CONFIG_HZ_100=y
 CONFIG_CMA=y
 CONFIG_CMA_AREAS=7
 CONFIG_NET=y
+CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_INET=y
+CONFIG_CFG80211=y
 CONFIG_UEVENT_HELPER=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_DEVTMPFS=y
@@ -44,6 +46,7 @@ CONFIG_DEVTMPFS=y
 CONFIG_NETDEVICES=y
 CONFIG_STMMAC_ETH=y
 CONFIG_SMSC_PHY=y
+CONFIG_BRCMFMAC=y
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
@@ -58,10 +61,12 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=3
 CONFIG_SERIAL_8250_INGENIC=y
 CONFIG_SERIAL_OF_PLATFORM=y
 # CONFIG_HW_RANDOM is not set
+CONFIG_I2C=y
+CONFIG_I2C_JZ4780=y
 CONFIG_GPIO_SYSFS=y
+CONFIG_SENSORS_ADS7828=y
 CONFIG_WATCHDOG=y
 CONFIG_JZ4740_WDT=y
-# CONFIG_HWMON is not set
 # CONFIG_LCD_CLASS_DEVICE is not set
 # CONFIG_BACKLIGHT_CLASS_DEVICE is not set
 # CONFIG_VGA_CONSOLE is not set
@@ -83,6 +88,7 @@ CONFIG_PROC_KCORE=y
 # CONFIG_PROC_PAGE_MONITOR is not set
 CONFIG_TMPFS=y
 CONFIG_CONFIGFS_FS=y
+CONFIG_NFS_FS=y
 CONFIG_NLS=y
 CONFIG_NLS_CODEPAGE_936=y
 CONFIG_NLS_CODEPAGE_950=y
-- 
2.7.4


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

* Re: [PATCH 0/2] Add HWMON and WiFi support for CU1000-Neo.
  2020-01-14 17:03 ` [PATCH 0/2] " 周琰杰 (Zhou Yanjie)
@ 2020-01-15 18:59   ` Paul Burton
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Burton @ 2020-01-15 18:59 UTC (permalink / raw)
  To: 周琰杰 (Zhou Yanjie)
  Cc: linux-mips, linux-kernel, devicetree, robh+dt, paul.burton,
	paulburton, jhogan, mark.rutland, syq, ralf, rick.tyliu, jason,
	keescook, geert+renesas, krzk, paul, prasannatsmkumar,
	sernia.zhou, zhenwenjin, ebiederm, linux-mips

[-- Warning: decoded text below may be mangled --]
[-- Attachment #0: Type: text/plain, Size: 1329 bytes --]

Hello,

周琰杰 (Zhou Yanjie) wrote:
> Add I2C0/I2C1/I2C2 nodes for X1000 and add I2C0, ADS7830,
> MSC1, AP6212A, wlan_pwrseq nodes for CU1000-Neo. Refresh
> CU1000-Neo's defconfig to support ADS7830 based HWMON
> and AP6212A WiFi module.
> 
> 周琰杰 (Zhou Yanjie) (2):
>   MIPS: Ingenic: Add missing nodes for X1000 and CU1000-Neo.
>   MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi.
> 
>  arch/mips/boot/dts/ingenic/cu1000-neo.dts | 71 +++++++++++++++++++++++++++++++
>  arch/mips/boot/dts/ingenic/x1000.dtsi     | 45 ++++++++++++++++++++
>  arch/mips/configs/cu1000-neo_defconfig    |  8 +++-

Series applied to mips-next.

> MIPS: Ingenic: Add missing nodes for X1000 and CU1000-Neo.
>   commit 0ba96b344a7f
>   https://git.kernel.org/mips/c/0ba96b344a7f
>   
>   Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
>   Signed-off-by: Paul Burton <paulburton@kernel.org>
> 
> MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi.
>   commit 1f33d9bcb995
>   https://git.kernel.org/mips/c/1f33d9bcb995
>   
>   Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
>   Signed-off-by: Paul Burton <paulburton@kernel.org>

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paulburton@kernel.org to report it. ]

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 17:03 Add HWMON and WiFi support for CU1000-Neo 周琰杰 (Zhou Yanjie)
2020-01-14 17:03 ` [PATCH 0/2] " 周琰杰 (Zhou Yanjie)
2020-01-15 18:59   ` Paul Burton
2020-01-14 17:03 ` [PATCH 1/2] MIPS: Ingenic: Add missing nodes for X1000 and CU1000-Neo 周琰杰 (Zhou Yanjie)
2020-01-14 17:03 ` [PATCH 2/2] MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi 周琰杰 (Zhou Yanjie)

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git