.. | .. |
---|
34 | 34 | vin-supply = <&vcc3v3_sys>; |
---|
35 | 35 | }; |
---|
36 | 36 | |
---|
37 | | - vcc3v3_vga: vcc3v3-vga { |
---|
38 | | - compatible = "regulator-fixed"; |
---|
39 | | - regulator-name = "vcc3v3_vga"; |
---|
40 | | - regulator-always-on; |
---|
41 | | - regulator-boot-on; |
---|
42 | | - gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>; |
---|
43 | | - enable-active-high; |
---|
44 | | - vin-supply = <&vcc3v3_sys>; |
---|
45 | | - }; |
---|
46 | 37 | |
---|
47 | 38 | pcie30_avdd0v9: pcie30-avdd0v9 { |
---|
48 | 39 | compatible = "regulator-fixed"; |
---|
.. | .. |
---|
146 | 137 | }; |
---|
147 | 138 | |
---|
148 | 139 | hp_en { |
---|
149 | | - gpio_num = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3 |
---|
| 140 | + gpio_num = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;//HP_EN_GPIO3_A6_3V3 |
---|
150 | 141 | gpio_function = <0>; |
---|
151 | 142 | }; |
---|
152 | 143 | |
---|
.. | .. |
---|
216 | 216 | status = "okay"; |
---|
217 | 217 | compatible = "rockchip,multicodecs-card"; |
---|
218 | 218 | rockchip,card-name = "rockchip-rk809"; |
---|
219 | | - hp-det-gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>; |
---|
| 219 | + hp-det-gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>; |
---|
220 | 220 | rockchip,format = "i2s"; |
---|
221 | 221 | rockchip,mclk-fs = <256>; |
---|
222 | 222 | rockchip,cpu = <&i2s1_8ch>; |
---|
223 | 223 | rockchip,codec = <&rk809_codec>; |
---|
224 | | - pinctrl-names = "default"; |
---|
225 | | - pinctrl-0 = <&hp_det>; |
---|
| 224 | +// pinctrl-names = "default"; |
---|
| 225 | +// pinctrl-0 = <&hp_det>; |
---|
226 | 226 | }; |
---|
227 | 227 | |
---|
228 | 228 | spdif-sound { |
---|
.. | .. |
---|
1329 | 1329 | |
---|
1330 | 1330 | &pinctrl { |
---|
1331 | 1331 | |
---|
1332 | | - headphone { |
---|
1333 | | - hp_det: hp-det { |
---|
1334 | | - rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_down>; |
---|
1335 | | - }; |
---|
1336 | | - }; |
---|
1337 | 1332 | |
---|
1338 | 1333 | mxc6655xa { |
---|
1339 | 1334 | mxc6655xa_irq_gpio: mxc6655xa_irq_gpio { |
---|
.. | .. |
---|
155 | 155 | int level2 = 0; |
---|
156 | 156 | struct rk_headset_pdata *pdata = headset_info->pdata; |
---|
157 | 157 | static unsigned int old_status = 0; |
---|
| 158 | + int ret; |
---|
158 | 159 | |
---|
159 | 160 | printk("---headsetobserve_work---\n"); |
---|
160 | 161 | mutex_lock(&headset_info->mutex_lock[HEADSET]); |
---|
.. | .. |
---|
182 | 183 | headset_info->headset_status ? "in" : "out"); |
---|
183 | 184 | if (headset_info->headset_status == HEADSET_IN) { |
---|
184 | 185 | headset_info->cur_headset_status = BIT_HEADSET_NO_MIC; |
---|
| 186 | + ret = gpio_direction_output(pdata->spk_ctl_gpio,0); |
---|
| 187 | + if (ret < 0) { |
---|
| 188 | + printk("spk_ctl_gpio set direction fail\n"); |
---|
| 189 | + } |
---|
185 | 190 | if (pdata->headset_insert_type == HEADSET_IN_HIGH) |
---|
186 | 191 | irq_set_irq_type(headset_info->irq[HEADSET], |
---|
187 | 192 | IRQF_TRIGGER_FALLING); |
---|
.. | .. |
---|
196 | 201 | goto out; |
---|
197 | 202 | } |
---|
198 | 203 | } else if (headset_info->headset_status == HEADSET_OUT) { |
---|
| 204 | + ret = gpio_direction_output(pdata->spk_ctl_gpio,1); |
---|
| 205 | + if (ret < 0) { |
---|
| 206 | + printk("spk_ctl_gpio set direction fail\n"); |
---|
| 207 | + } |
---|
199 | 208 | headset_info->hook_status = HOOK_UP; |
---|
200 | 209 | if (headset_info->isHook_irq == enable) { |
---|
201 | 210 | DBG("disable headset_hook irq\n"); |
---|
.. | .. |
---|
11 | 11 | struct rk_headset_pdata { |
---|
12 | 12 | /* heaset about */ |
---|
13 | 13 | unsigned int headset_gpio; |
---|
| 14 | + unsigned int spk_ctl_gpio; |
---|
14 | 15 | /* Headphones into the state level */ |
---|
15 | 16 | unsigned int headset_insert_type; |
---|
16 | 17 | /* hook about */ |
---|
.. | .. |
---|
73 | 73 | HEADSET_IN_LOW : |
---|
74 | 74 | HEADSET_IN_HIGH; |
---|
75 | 75 | } |
---|
| 76 | + |
---|
| 77 | + /* spk-ctl */ |
---|
| 78 | + ret = of_get_named_gpio_flags(node, "spk_ctl_gpio", 0, &flags); |
---|
| 79 | + if (ret < 0) { |
---|
| 80 | + dev_err(&pdev->dev, "Can not read property headset_gpio\n"); |
---|
| 81 | + goto err; |
---|
| 82 | + } else { |
---|
| 83 | + pdata->spk_ctl_gpio = ret; |
---|
| 84 | + ret = devm_gpio_request(&pdev->dev, pdata->spk_ctl_gpio, |
---|
| 85 | + "spk_ctl_gpio"); |
---|
| 86 | + if (ret < 0) { |
---|
| 87 | + dev_err(&pdev->dev, "spk_ctl_gpio request fail\n"); |
---|
| 88 | + goto err; |
---|
| 89 | + } |
---|
| 90 | + |
---|
| 91 | + ret = gpio_get_value(pdata->headset_gpio); |
---|
| 92 | + printk(" headset_gpio value : %d\n",ret); |
---|
| 93 | + if (ret == 0) |
---|
| 94 | + ret = gpio_direction_output(pdata->spk_ctl_gpio,0); |
---|
| 95 | + else |
---|
| 96 | + ret = gpio_direction_output(pdata->spk_ctl_gpio,1); |
---|
| 97 | + if (ret < 0) { |
---|
| 98 | + dev_err(&pdev->dev, |
---|
| 99 | + "spk_ctl_gpio set direction fail\n"); |
---|
| 100 | + goto err; |
---|
| 101 | + } |
---|
| 102 | + } |
---|
| 103 | + |
---|
76 | 104 | /* hook */ |
---|
77 | 105 | ret = of_get_named_gpio_flags(node, "hook_gpio", 0, &pdata->hook_gpio); |
---|
78 | 106 | if (ret < 0) { |
---|
.. | .. |
---|
1 | 1 | #!/bin/bash -e |
---|
2 | 2 | #TARGET_ROOTFS_DIR=/home/data/rootfs/rk356x/ubuntu20-lxde/lxde_ubuntu20_rootfs |
---|
3 | 3 | #TARGET_ROOTFS_DIR=/home/data/rootfs/rk356x/debian10/rk3568_likong |
---|
4 | | -TARGET_ROOTFS_DIR=/home/data/rootfs/rk356x/debian11/debian11_rootfs |
---|
| 4 | +#TARGET_ROOTFS_DIR=/home/data/rootfs/rk356x/debian11/debian11_rootfs |
---|
| 5 | +TARGET_ROOTFS_DIR=/home/data/rootfs/rk356x/debian10/debian_rootfs_5.10 |
---|
5 | 6 | MOUNTPOINT=./temp |
---|
6 | 7 | ROOTFSIMAGE=rootfs.ext4 |
---|
7 | 8 | OUT=$PWD/tools/linux/Linux_Pack_Firmware/rockdev/Image/ |
---|