ipq806x: add i2c chips support for m520 (#4055)

This commit enable lm75 and pcf8563 for m520.

Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
This commit is contained in:
AmadeusGhost 2020-03-27 16:56:25 +08:00 committed by GitHub
parent 114cfd3d1b
commit 77b85a3e18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 55 deletions

View File

@ -33,10 +33,6 @@ netgear,r7800)
ucidef_set_led_switch "wan" "WAN" "${boardname}:white:wan" "switch0" "0x20"
ucidef_set_led_ide "esata" "eSATA" "${boardname}:white:esata"
;;
ruijie,rg-mtfi-m520)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy0tpt"
;;
tplink,c2600)
ucidef_set_led_usbport "usb1" "USB 1" "${boardname}:white:usb_2" "usb1-port1" "usb2-port1"
ucidef_set_led_usbport "usb2" "USB 2" "${boardname}:white:usb_4" "usb3-port1" "usb4-port1"

View File

@ -5,10 +5,10 @@
preinit_set_mac_address() {
case $(board_name) in
ruijie,rg-mtfi-m520)
base_mac=$(mtd_get_mac_ascii PRODUCTINFO ethaddr)
ip link set dev eth0 address $(macaddr_add "$base_mac" +1)
ip link set dev eth1 address $(macaddr_add "$base_mac" +2)
;;
base_mac=$(mtd_get_mac_ascii PRODUCTINFO ethaddr)
ip link set dev eth0 address $(macaddr_add "$base_mac" +1)
ip link set dev eth1 address $(macaddr_add "$base_mac" +2)
;;
esac
}

View File

@ -134,6 +134,27 @@
};
};
gsbi2: gsbi@12480000 {
qcom,mode = <GSBI_PROT_I2C_UART>;
status = "ok";
i2c@124a0000 {
status = "ok";
lm75@48 {
status = "okay";
compatible = "lm75";
reg = <0x48>;
};
pcf8563: rtc@51 {
status = "okay";
compatible = "nxp,pcf8563";
reg = <0x51>;
};
};
};
gsbi@16300000 {
qcom,mode = <GSBI_PROT_I2C_UART>;
status = "ok";
@ -161,10 +182,10 @@
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
flash: m25p80@0 {
compatible = "jedec,spi-nor";
compatible = "s25fl256s1";
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <51200000>;
spi-max-frequency = <50000000>;
reg = <0>;
SBL1@0 {
@ -367,27 +388,6 @@
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
usb_1 {
label = "m520:green:usb_1";
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
};
usb_3 {
label = "m520:green:usb_3";
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
};
status_green {
label = "m520:green:status";
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_LOW>;
};
};
};
&adm_dma {

View File

@ -134,6 +134,27 @@
};
};
gsbi2: gsbi@12480000 {
qcom,mode = <GSBI_PROT_I2C_UART>;
status = "ok";
i2c@124a0000 {
status = "ok";
lm75@48 {
status = "okay";
compatible = "lm75";
reg = <0x48>;
};
pcf8563: rtc@51 {
status = "okay";
compatible = "nxp,pcf8563";
reg = <0x51>;
};
};
};
gsbi@16300000 {
qcom,mode = <GSBI_PROT_I2C_UART>;
status = "ok";
@ -161,10 +182,10 @@
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
flash: m25p80@0 {
compatible = "jedec,spi-nor";
compatible = "s25fl256s1";
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <51200000>;
spi-max-frequency = <50000000>;
reg = <0>;
SBL1@0 {
@ -367,27 +388,6 @@
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
usb_1 {
label = "m520:green:usb_1";
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
};
usb_3 {
label = "m520:green:usb_3";
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
};
status_green {
label = "m520:green:status";
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_LOW>;
};
};
};
&adm_dma {

View File

@ -275,7 +275,8 @@ define Device/ruijie_rg-mtfi-m520
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$${BLOCKSIZE} | sysupgrade-tar rootfs=$$$$@ | append-metadata
IMAGE/mmcblk0p2-kernel.bin := append-kernel | pad-to $$$${KERNEL_SIZE}
IMAGE/mmcblk0p3-rootfs.bin := append-rootfs | pad-rootfs
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct blockd e2fsprogs f2fs-tools kmod-fs-ext4 kmod-fs-f2fs losetup
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct e2fsprogs f2fs-tools \
kmod-hwmon-lm75 kmod-fs-ext4 kmod-fs-f2fs kmod-rtc-pcf8563 losetup
endef
TARGET_DEVICES += ruijie_rg-mtfi-m520