Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm64: dts: qcom: msm8916-samsung-j5-common: Add MUIC support

The MUIC installed is a part of SM5703 MFD, and it seems to work
the same as the SM5502 MUIC unit.

Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
[Apply for msm8916-samsung-j5x]
Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230106143051.547302-1-linmengbo0689@protonmail.com

authored by

Markuss Broks and committed by
Bjorn Andersson
83a54e61 027523b7

+50 -8
+42 -8
arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
··· 3 3 #include "msm8916-pm8916.dtsi" 4 4 #include <dt-bindings/gpio/gpio.h> 5 5 #include <dt-bindings/input/input.h> 6 + #include <dt-bindings/interrupt-controller/irq.h> 6 7 7 8 / { 8 9 aliases { ··· 59 58 linux,code = <KEY_HOMEPAGE>; 60 59 }; 61 60 }; 61 + 62 + i2c_muic: i2c-muic { 63 + compatible = "i2c-gpio"; 64 + sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 65 + scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 66 + 67 + pinctrl-names = "default"; 68 + pinctrl-0 = <&muic_i2c_default>; 69 + 70 + #address-cells = <1>; 71 + #size-cells = <0>; 72 + 73 + muic: extcon@25 { 74 + compatible = "siliconmitus,sm5703-muic"; 75 + reg = <0x25>; 76 + 77 + interrupt-parent = <&msmgpio>; 78 + interrupts = <12 IRQ_TYPE_EDGE_FALLING>; 79 + 80 + pinctrl-names = "default"; 81 + pinctrl-0 = <&muic_int_default>; 82 + }; 83 + }; 62 84 }; 63 85 64 86 &blsp1_uart2 { ··· 91 67 &pm8916_resin { 92 68 status = "okay"; 93 69 linux,code = <KEY_VOLUMEDOWN>; 94 - }; 95 - 96 - /* FIXME: Replace with SM5703 MUIC when driver is available */ 97 - &pm8916_usbin { 98 - status = "okay"; 99 70 }; 100 71 101 72 &pronto { ··· 116 97 }; 117 98 118 99 &usb { 100 + extcon = <&muic>, <&muic>; 119 101 status = "okay"; 120 - dr_mode = "peripheral"; 121 - extcon = <&pm8916_usbin>; 122 102 }; 123 103 124 104 &usb_hs_phy { 125 - extcon = <&pm8916_usbin>; 105 + extcon = <&muic>; 126 106 }; 127 107 128 108 &smd_rpm_regulators { ··· 242 224 243 225 drive-strength = <2>; 244 226 bias-pull-up; 227 + }; 228 + 229 + muic_i2c_default: muic-i2c-default-state { 230 + pins = "gpio105", "gpio106"; 231 + function = "gpio"; 232 + 233 + drive-strength = <2>; 234 + bias-disable; 235 + }; 236 + 237 + muic_int_default: muic-int-default-state { 238 + pins = "gpio12"; 239 + function = "gpio"; 240 + 241 + drive-strength = <2>; 242 + bias-disable; 245 243 }; 246 244 };
+8
arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts
··· 9 9 compatible = "samsung,j5x", "qcom,msm8916"; 10 10 chassis-type = "handset"; 11 11 }; 12 + 13 + &muic { 14 + interrupts = <121 IRQ_TYPE_EDGE_FALLING>; 15 + }; 16 + 17 + &muic_int_default { 18 + pins = "gpio121"; 19 + };